From 0f510846b26e3de3f85a432d70022cb8e8342367 Mon Sep 17 00:00:00 2001 From: Apotheosis <97164662+0xApotheosis@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:16:06 +1000 Subject: [PATCH 1/2] fix: invalidate taproot addresses --- src/lib/address/address.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/address/address.ts b/src/lib/address/address.ts index 33808dcf356..a929f7978ae 100644 --- a/src/lib/address/address.ts +++ b/src/lib/address/address.ts @@ -252,6 +252,7 @@ type ValidateAddressReturn = boolean export type ValidateAddressByChainId = (args: ValidateAddressArgs) => Promise export const validateAddress: ValidateAddressByChainId = async ({ chainId, maybeAddress }) => { + if (chainId === btcChainId && maybeAddress.startsWith('bc1p')) return false try { const adapter = getChainAdapterManager().get(chainId) if (!adapter) return false From 6178ccd5d6e42ee3ee1bafca3409130570abca91 Mon Sep 17 00:00:00 2001 From: Apotheosis <97164662+0xApotheosis@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:17:09 +1000 Subject: [PATCH 2/2] chore: add comment --- src/lib/address/address.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/address/address.ts b/src/lib/address/address.ts index a929f7978ae..72281228d20 100644 --- a/src/lib/address/address.ts +++ b/src/lib/address/address.ts @@ -252,6 +252,7 @@ type ValidateAddressReturn = boolean export type ValidateAddressByChainId = (args: ValidateAddressArgs) => Promise 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)