electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 020f0637d7d8ec412df3762cfa9485a36574d274
parent 7578ce23315d6b34f40aa398af8ec045c2af9a51
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 23 Oct 2017 14:03:43 +0200

trezor: only TYPE_ADDRESS is needed for non-change outputs

Diffstat:
Mplugins/trezor/plugin.py | 11+----------
1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/plugins/trezor/plugin.py b/plugins/trezor/plugin.py @@ -356,16 +356,7 @@ class TrezorCompatiblePlugin(HW_PluginBase): txoutputtype.script_type = self.types.PAYTOOPRETURN txoutputtype.op_return_data = address[2:] elif _type == TYPE_ADDRESS: - if is_segwit_address(address): - txoutputtype.script_type = self.types.PAYTOWITNESS - else: - addrtype, hash_160 = b58_address_to_hash160(address) - if addrtype == ADDRTYPE_P2PKH: - txoutputtype.script_type = self.types.PAYTOADDRESS - elif addrtype == ADDRTYPE_P2SH: - txoutputtype.script_type = self.types.PAYTOSCRIPTHASH - else: - raise BaseException('addrtype') + txoutputtype.script_type = self.types.PAYTOADDRESS txoutputtype.address = address outputs.append(txoutputtype)