Skip to content

Commit

Permalink
Merge pull request #663 from threshold-network/redemption-validation-…
Browse files Browse the repository at this point in the history
…error

Inadequate network parameter for address validation utility function

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
michalsmiarowski authored Nov 21, 2023
2 parents 7e5bdb1 + fdce8f5 commit e18148c
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 e18148c

Please sign in to comment.