Browse Source

ledger: send derivation for change output

3.2.x
SomberNight 7 years ago
parent
commit
502d72c167
  1. 10
      plugins/ledger/ledger.py

10
plugins/ledger/ledger.py

@ -418,6 +418,11 @@ class Ledger_KeyStore(Hardware_KeyStore):
if segwitTransaction:
self.get_client().startUntrustedTransaction(True, inputIndex,
chipInputs, redeemScripts[inputIndex])
if changePath:
# we don't set meaningful outputAddress, amount and fees
# as we only care about the alternateEncoding==True branch
outputData = self.get_client().finalizeInput(b'', 0, 0, changePath, bfh(rawTx))
else:
outputData = self.get_client().finalizeInputFull(txOutput)
outputData['outputData'] = txOutput
transactionOutput = outputData['outputData']
@ -441,6 +446,11 @@ class Ledger_KeyStore(Hardware_KeyStore):
while inputIndex < len(inputs):
self.get_client().startUntrustedTransaction(firstTransaction, inputIndex,
chipInputs, redeemScripts[inputIndex])
if changePath:
# we don't set meaningful outputAddress, amount and fees
# as we only care about the alternateEncoding==True branch
outputData = self.get_client().finalizeInput(b'', 0, 0, changePath, bfh(rawTx))
else:
outputData = self.get_client().finalizeInputFull(txOutput)
outputData['outputData'] = txOutput
if firstTransaction:

Loading…
Cancel
Save