From c73613a9fc34853589793d6cd36b00348d82bf8b Mon Sep 17 00:00:00 2001 From: Andrei Riaskov Date: Sat, 1 Jun 2019 21:14:31 +0400 Subject: [PATCH] Trying to fix Could not find Ledger input. --- lib/bcoin.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/bcoin.js b/lib/bcoin.js index 0913907..a485b8a 100644 --- a/lib/bcoin.js +++ b/lib/bcoin.js @@ -240,15 +240,18 @@ class LedgerBcoin { await sigstate.collectTrustedInputs(); await sigstate.cacheWitnessInputs(); + let index = 0 for (const li of ledgerInputs) { - const index = sigstate.getIndex(li); + // const index = sigstate.getIndex(li); - assert(index >= 0, 'Could not find ledger input index.'); + // assert(index >= 0, 'Could not find ledger input index.'); const sig = await sigstate.getSignature(li); assert(this.applySignature(tx, index, li, sig), 'Adding signature failed.'); + + index++ } sigstate.destroy();