Skip to content

Commit

Permalink
fix: signing psbt with taproot address with okx wallet (#136)
Browse files Browse the repository at this point in the history
* fix: signing psbt with taproot address with okx wallet

* Create long-drinks-search.md
  • Loading branch information
slavastartsev authored Jan 3, 2025
1 parent 5c4e1ac commit 41e282b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/long-drinks-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gobob/sats-wagmi": patch
---

fix: signing psbt with taproot address with okx wallet
7 changes: 5 additions & 2 deletions packages/sats-wagmi/src/connectors/okx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,14 @@ class OKXConnector extends SatsConnector {
}
}

const addressType = this.getAddressType(this.paymentAddress!);

const toSignInputs = inputs.map((index) => {
return {
index,
publicKey,
disableTweakSigner: this.getAddressType(this.paymentAddress!) !== AddressType.p2tr
...(addressType === AddressType.p2tr
? { address: this.paymentAddress, disableTweakSigner: false }
: { publicKey: publicKey, disableTweakSigner: true })
};
});

Expand Down

0 comments on commit 41e282b

Please sign in to comment.