Skip to content

Commit

Permalink
fix: invalidate taproot addresses for sends (#7819)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xApotheosis authored Sep 26, 2024
1 parent 29013ae commit d43939c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/address/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ type ValidateAddressReturn = boolean
export type ValidateAddressByChainId = (args: ValidateAddressArgs) => Promise<ValidateAddressReturn>

export const validateAddress: ValidateAddressByChainId = async ({ chainId, maybeAddress }) => {
// Invalidate taproot addresses for BTC
if (chainId === btcChainId && maybeAddress.startsWith('bc1p')) return false
try {
const adapter = getChainAdapterManager().get(chainId)
if (!adapter) return false
Expand Down

0 comments on commit d43939c

Please sign in to comment.