mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-18 11:21:11 +00:00
signtx: fix address derivation
This commit is contained in:
parent
24d8a04131
commit
4f8e01c5df
@ -296,13 +296,13 @@ def output_paytoaddress_extract_raw_address(o: TxOutputType, coin: CoinType, roo
|
||||
# TODO: detect correct address type
|
||||
if o_address_n is not None:
|
||||
n = node_derive(root, o_address_n)
|
||||
raw_address = base58.decode_check(n.address())
|
||||
raw_address = base58.decode_check(n.address(coin.address_type))
|
||||
elif o_address:
|
||||
raw_address = base58.decode_check(o_address)
|
||||
if raw_address[0] != coin.address_type:
|
||||
raise SigningError('Invalid address type')
|
||||
else:
|
||||
raise SigningError('Missing address')
|
||||
if raw_address[0] != coin.address_type:
|
||||
raise SigningError('Invalid address type')
|
||||
return raw_address
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user