1
0

follow-up prev. sanity check OP_RETURN outputs

based on 86c63a3a08
This commit is contained in:
SomberNight
2018-07-31 13:03:34 +02:00
parent e1b2195cf7
commit c9c8b7656d
4 changed files with 21 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ from electrum.wallet import Standard_Wallet
from electrum.base_wizard import ScriptTypeNotSupported
from ..hw_wallet import HW_PluginBase
from ..hw_wallet.plugin import is_any_tx_output_on_change_branch
from ..hw_wallet.plugin import is_any_tx_output_on_change_branch, trezor_validate_op_return_output_and_get_data
# TREZOR initialization methods
@@ -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 = bfh(address)[2:]
txoutputtype.op_return_data = trezor_validate_op_return_output_and_get_data(_type, address, amount)
elif _type == TYPE_ADDRESS:
if is_segwit_address(address):
txoutputtype.script_type = self.types.PAYTOWITNESS