commit e1b2195cf7c4a3194812612ebae0b85ed56938aa
parent 629b9cb3b54cd067da9673c8fb84d49e417903bf
Author: SomberNight <somber.night@protonmail.com>
Date: Tue, 31 Jul 2018 12:30:43 +0200
fix #4591: pay to OP_RETURN on trezor
Diffstat:
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/electrum/plugins/keepkey/keepkey.py b/electrum/plugins/keepkey/keepkey.py
@@ -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 = address[2:]
+ txoutputtype.op_return_data = bfh(address)[2:]
elif _type == TYPE_ADDRESS:
if is_segwit_address(address):
txoutputtype.script_type = self.types.PAYTOWITNESS
diff --git a/electrum/plugins/safe_t/safe_t.py b/electrum/plugins/safe_t/safe_t.py
@@ -453,7 +453,7 @@ class SafeTPlugin(HW_PluginBase):
txoutputtype.amount = amount
if _type == TYPE_SCRIPT:
txoutputtype.script_type = self.types.OutputScriptType.PAYTOOPRETURN
- txoutputtype.op_return_data = address[2:]
+ txoutputtype.op_return_data = bfh(address)[2:]
elif _type == TYPE_ADDRESS:
txoutputtype.script_type = self.types.OutputScriptType.PAYTOADDRESS
txoutputtype.address = address
diff --git a/electrum/plugins/trezor/trezor.py b/electrum/plugins/trezor/trezor.py
@@ -464,7 +464,7 @@ class TrezorPlugin(HW_PluginBase):
txoutputtype.amount = amount
if _type == TYPE_SCRIPT:
txoutputtype.script_type = self.types.OutputScriptType.PAYTOOPRETURN
- txoutputtype.op_return_data = address[2:]
+ txoutputtype.op_return_data = bfh(address)[2:]
elif _type == TYPE_ADDRESS:
txoutputtype.script_type = self.types.OutputScriptType.PAYTOADDRESS
txoutputtype.address = address