Skip to content

Commit 41e282b

Browse files
fix: signing psbt with taproot address with okx wallet (#136)
* fix: signing psbt with taproot address with okx wallet * Create long-drinks-search.md
1 parent 5c4e1ac commit 41e282b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.changeset/long-drinks-search.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@gobob/sats-wagmi": patch
3+
---
4+
5+
fix: signing psbt with taproot address with okx wallet

packages/sats-wagmi/src/connectors/okx.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,14 @@ class OKXConnector extends SatsConnector {
153153
}
154154
}
155155

156+
const addressType = this.getAddressType(this.paymentAddress!);
157+
156158
const toSignInputs = inputs.map((index) => {
157159
return {
158160
index,
159-
publicKey,
160-
disableTweakSigner: this.getAddressType(this.paymentAddress!) !== AddressType.p2tr
161+
...(addressType === AddressType.p2tr
162+
? { address: this.paymentAddress, disableTweakSigner: false }
163+
: { publicKey: publicKey, disableTweakSigner: true })
161164
};
162165
});
163166

0 commit comments

Comments
 (0)