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

@@ -382,7 +382,7 @@ class KeepKeyPlugin(HW_PluginBase):
txoutputtype.amount = amount
if _type == TYPE_SCRIPT:
txoutputtype.script_type = self.types.PAYTOOPRETURN
txoutputtype.op_return_data = trezor_validate_op_return_output_and_get_data(_type, address, amount)
txoutputtype.op_return_data = trezor_validate_op_return_output_and_get_data(o)
elif _type == TYPE_ADDRESS:
if is_segwit_address(address):
txoutputtype.script_type = self.types.PAYTOWITNESS
@@ -401,7 +401,8 @@ class KeepKeyPlugin(HW_PluginBase):
has_change = False
any_output_on_change_branch = is_any_tx_output_on_change_branch(tx)
for _type, address, amount in tx.outputs():
for o in tx.outputs():
_type, address, amount = o.type, o.address, o.value
use_create_by_derivation = False
info = tx.output_info.get(address)