diff --git a/src/app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks.ts b/src/app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks.ts index 981d47e65a2..a99ce1562a6 100644 --- a/src/app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks.ts +++ b/src/app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks.ts @@ -150,15 +150,17 @@ export function useUpdateLedgerSpecificNativeSegwitUtxoHexForAdddressIndexZero() ); inputSigningConfig.forEach(({ index }) => { - // don't update nonWitnessUtxo if it already exists - if (tx.data.inputs.every(input => !isDefined(input.nonWitnessUtxo))) { - tx.updateInput(index, { - nonWitnessUtxo: Buffer.from(inputsTxHex[index], 'hex'), - }); - void analytics.track('ledger_nativesegwit_add_nonwitnessutxo'); - } else { - void analytics.track('ledger_nativesegwit_skip_add_nonwitnessutxo'); - } + // decorate input with nonWitnessUtxo unless it already exists + tx.data.inputs.every(input => { + if (!isDefined(input.nonWitnessUtxo)) { + tx.updateInput(index, { + nonWitnessUtxo: Buffer.from(inputsTxHex[index], 'hex'), + }); + void analytics.track('ledger_nativesegwit_add_nonwitnessutxo'); + } else { + void analytics.track('ledger_nativesegwit_skip_add_nonwitnessutxo'); + } + }); }); }; }