Skip to content

Commit ef87d6e

Browse files
committed
fix: fix p2tr error
1 parent 94b851c commit ef87d6e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unisat-extension",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"private": true,
55
"homepage": "https://github.com/unisat-wallet/extension#readme",
66
"bugs": {

src/background/controller/wallet.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ export class WalletController extends BaseController {
393393
const keyring = await keyringService.getKeyringForAccount(account.pubkey, account.type);
394394

395395
const toSignInputs: ToSignInput[] = [];
396-
396+
const addressType = preferenceService.getAddressType();
397397
psbt.data.inputs.forEach((v, index) => {
398398
let script: any = null;
399399
let value = 0;
@@ -415,6 +415,9 @@ export class WalletController extends BaseController {
415415
publicKey: account.pubkey,
416416
sighashTypes: v.sighashType ? [v.sighashType] : undefined
417417
});
418+
if (addressType === AddressType.P2TR && !v.tapInternalKey) {
419+
v.tapInternalKey = toXOnly(Buffer.from(account.pubkey, 'hex'));
420+
}
418421
}
419422
}
420423
});

0 commit comments

Comments
 (0)