diff --git a/mpc-core-kit-web/mpc-core-kit-bitcoin/src/BitcoinComponent.tsx b/mpc-core-kit-web/mpc-core-kit-bitcoin/src/BitcoinComponent.tsx index 944db876..c66ed9f3 100644 --- a/mpc-core-kit-web/mpc-core-kit-bitcoin/src/BitcoinComponent.tsx +++ b/mpc-core-kit-web/mpc-core-kit-bitcoin/src/BitcoinComponent.tsx @@ -73,8 +73,8 @@ export const BitcoinComponent: React.FC = ({ coreKitInsta if (coreKitInstance) { const localSigner: SignerAsync = createBitcoinJsSigner({ coreKitInstance, network: bitcoinNetwork }); setSigner(localSigner); - const bip340Signer: SignerAsync = createBitcoinJsSignerBip340({ coreKitInstance, network: bitcoinNetwork }); - setBip340Signer(bip340Signer); + const localbip340Signer: SignerAsync = createBitcoinJsSignerBip340({ coreKitInstance, network: bitcoinNetwork }); + setBip340Signer(localbip340Signer); } }, []); @@ -117,7 +117,7 @@ export const BitcoinComponent: React.FC = ({ coreKitInsta ? payments.p2pkh({ pubkey: signer.publicKey, network: bitcoinNetwork }) : transactionType === "Segwit" ? payments.p2wpkh({ pubkey: signer.publicKey, network: bitcoinNetwork }) - : payments.p2tr({ pubkey: bip340Signer.publicKey, network: bitcoinNetwork }); + : payments.p2tr({ pubkey: bip340Signer.publicKey.subarray(1, 33), network: bitcoinNetwork }); const utxos = await fetchUtxos(account.address!);