fix: add update input for tapInternalKey

This commit is contained in:
fbwoolf
2023-07-28 12:46:10 -05:00
committed by Fara Woolf
parent 62b479c1fc
commit e085927a5d
2 changed files with 2 additions and 1 deletions

View File

@@ -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 {

View File

@@ -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,