Skip to content

Commit

Permalink
Add missing network parameter
Browse files Browse the repository at this point in the history
There is an error with redemption validation function caused by the
network parameter which fallbacks to mainnet on a testnet when is not
provided.
  • Loading branch information
kpyszkowski committed Nov 21, 2023
1 parent 6bc76d8 commit fdce8f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/threshold-ts/tbtc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ export class TBTC implements ITBTC {
return (
!isValidBtcAddress(btcAddress, network) ||
(!isPublicKeyHashTypeAddress(btcAddress, network) &&
!isPayToScriptHashTypeAddress(btcAddress))
!isPayToScriptHashTypeAddress(btcAddress, network))
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const validateUnmintBTCAddress = (
} else if (
!isValidBtcAddress(address, network) ||
(!isPublicKeyHashTypeAddress(address, network) &&
!isPayToScriptHashTypeAddress(address))
!isPayToScriptHashTypeAddress(address, network))
) {
return `The BTC address has to start with ${getBridgeBTCSupportedAddressPrefixesText(
"unmint",
Expand Down

0 comments on commit fdce8f5

Please sign in to comment.