1
0

transaction: introduce TxOutput namedtuple

This commit is contained in:
SomberNight
2018-07-31 18:24:37 +02:00
parent f64062b6f1
commit 2eb72d496f
21 changed files with 122 additions and 109 deletions

View File

@@ -394,9 +394,9 @@ class Ledger_KeyStore(Hardware_KeyStore):
self.give_error("Transaction with more than 2 outputs not supported")
has_change = False
any_output_on_change_branch = is_any_tx_output_on_change_branch(tx)
for _type, address, amount in tx.outputs():
assert _type == TYPE_ADDRESS
info = tx.output_info.get(address)
for o in tx.outputs():
assert o.type == TYPE_ADDRESS
info = tx.output_info.get(o.address)
if (info is not None) and len(tx.outputs()) > 1 \
and not has_change:
index, xpubs, m = info
@@ -407,9 +407,9 @@ class Ledger_KeyStore(Hardware_KeyStore):
changePath = self.get_derivation()[2:] + "/%d/%d"%index
has_change = True
else:
output = address
output = o.address
else:
output = address
output = o.address
self.handler.show_message(_("Confirm Transaction on your Ledger device..."))
try: