Browse Source

ledger: disable getTrustedInput

3.0.x
ThomasV 7 years ago
parent
commit
1ecfcea8dc
  1. 13
      plugins/ledger/ledger.py

13
plugins/ledger/ledger.py

@ -366,12 +366,13 @@ class Ledger_KeyStore(Hardware_KeyStore):
tmp += txtmp.outputs[utxo[1]].amount tmp += txtmp.outputs[utxo[1]].amount
chipInputs.append({'value' : tmp, 'witness' : True, 'sequence' : sequence}) chipInputs.append({'value' : tmp, 'witness' : True, 'sequence' : sequence})
redeemScripts.append(bfh(utxo[2])) redeemScripts.append(bfh(utxo[2]))
elif not p2shTransaction: # FIXME: getTrustedInput fails with native segwit transactions (firmware issue)
txtmp = bitcoinTransaction(bfh(utxo[0])) #elif not p2shTransaction:
trustedInput = self.get_client().getTrustedInput(txtmp, utxo[1]) # txtmp = bitcoinTransaction(bfh(utxo[0]))
trustedInput['sequence'] = sequence # trustedInput = self.get_client().getTrustedInput(txtmp, utxo[1])
chipInputs.append(trustedInput) # trustedInput['sequence'] = sequence
redeemScripts.append(txtmp.outputs[utxo[1]].script) # chipInputs.append(trustedInput)
# redeemScripts.append(txtmp.outputs[utxo[1]].script)
else: else:
tmp = bfh(utxo[3])[::-1] tmp = bfh(utxo[3])[::-1]
tmp += bfh(int_to_hex(utxo[1], 4)) tmp += bfh(int_to_hex(utxo[1], 4))

Loading…
Cancel
Save