Skip to content

Commit

Permalink
Use taproot address for Xverse
Browse files Browse the repository at this point in the history
  • Loading branch information
jordankzf committed Jul 17, 2023
1 parent 11716e3 commit 4bd973c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/sado-connect/src/components/SelectWalletModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,11 @@ export function SelectWalletModal({
const xverse = await ordit.xverse.getAddresses({
network,
});
// Xverse returns a segwit and a taproot address
// The taproot one is missing the secp256k1 Y coordinate for some reason
// So we have to fallback to the segwit address
const segwitAddress = xverse.find(
(address) => address.format === "segwit"
const taprootAddress = xverse.find(
(address) => address.format === "taproot"
);
updateAddress(segwitAddress.address);
updatePublicKey(segwitAddress.pub);
updateAddress(taprootAddress.address);
updatePublicKey(taprootAddress.pub);
updateWallet(Wallet.XVERSE);
closeModal();
} catch (err: any) {
Expand Down

0 comments on commit 4bd973c

Please sign in to comment.