mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-17 05:03:07 +00:00
signtx layout: check if address starts with prefix
Only addresses starting with bitcoincash: should get their prefix skipped. This fixes a bug where it skips the first bytes of legacy addresses.
This commit is contained in:
parent
3813d3dc80
commit
37ae7c06a4
@ -29,7 +29,7 @@ async def confirm_output(ctx, output, coin):
|
|||||||
ui.MONO, *split_op_return(data), icon_color=ui.GREEN)
|
ui.MONO, *split_op_return(data), icon_color=ui.GREEN)
|
||||||
else:
|
else:
|
||||||
address = output.address
|
address = output.address
|
||||||
address_short = address[len(coin.cashaddr_prefix) + 1:] if coin.cashaddr_prefix is not None else address
|
address_short = address[len(coin.cashaddr_prefix) + 1:] if coin.cashaddr_prefix is not None and address.startswith(coin.cashaddr_prefix + ':') else address
|
||||||
content = Text('Confirm sending', ui.ICON_SEND,
|
content = Text('Confirm sending', ui.ICON_SEND,
|
||||||
ui.NORMAL, format_coin_amount(output.amount, coin) + ' to',
|
ui.NORMAL, format_coin_amount(output.amount, coin) + ' to',
|
||||||
ui.MONO, *split_address(address_short), icon_color=ui.GREEN)
|
ui.MONO, *split_address(address_short), icon_color=ui.GREEN)
|
||||||
|
Loading…
Reference in New Issue
Block a user