mirror of
https://github.com/zhigang1992/wallet.git
synced 2026-01-12 09:34:37 +08:00
fix: add update input for tapInternalKey
This commit is contained in:
@@ -40,7 +40,7 @@ export function usePsbtSigner() {
|
||||
// If type taproot, and the tapInternalKey is missing, assume it should
|
||||
// be the account publicKey
|
||||
if (taprootSigner && witnessOutputScript?.type === 'tr' && !input.tapInternalKey) {
|
||||
input.tapInternalKey = taprootSigner.payment.tapInternalKey;
|
||||
tx.updateInput(idx, { ...input, tapInternalKey: taprootSigner.payment.tapInternalKey });
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -139,6 +139,7 @@ function buildTestTaprootPsbtRequestWithIndex(pubKey: Uint8Array): PsbtRequestOp
|
||||
tx.addInput({
|
||||
index: 0,
|
||||
txid: '4f4cc7cb40b04978bd7704798dc1adf55b58196cef616b0fac8181965abc4726',
|
||||
// tapInternalKey: payment.tapInternalKey,
|
||||
witnessUtxo: {
|
||||
amount: BigInt(1000),
|
||||
script: payment.script,
|
||||
|
||||
Reference in New Issue
Block a user