mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +00:00
src/apps/wallet: drop cashaddr prefix from the ui
This commit is contained in:
parent
1a0233af9d
commit
6c2c99688b
@ -17,10 +17,11 @@ async def get_address(ctx, msg):
|
||||
|
||||
node = await seed.derive_node(ctx, msg.address_n)
|
||||
address = addresses.get_address(msg.script_type, coin, node, msg.multisig)
|
||||
address_short = address[len(coin.cashaddr_prefix) + 1:] if coin.cashaddr_prefix is not None else address
|
||||
|
||||
if msg.show_display:
|
||||
while True:
|
||||
if await _show_address(ctx, address):
|
||||
if await _show_address(ctx, address_short):
|
||||
break
|
||||
if await _show_qr(ctx, address.upper() if msg.script_type == InputScriptType.SPENDWITNESS else address):
|
||||
break
|
||||
|
@ -29,9 +29,10 @@ async def confirm_output(ctx, output, coin):
|
||||
ui.MONO, *split_op_return(data), icon_color=ui.GREEN)
|
||||
else:
|
||||
address = output.address
|
||||
address_short = address[len(coin.cashaddr_prefix) + 1:] if coin.cashaddr_prefix is not None else address
|
||||
content = Text('Confirm sending', ui.ICON_SEND,
|
||||
ui.NORMAL, format_coin_amount(output.amount, coin) + ' to',
|
||||
ui.MONO, *split_address(address), icon_color=ui.GREEN)
|
||||
ui.MONO, *split_address(address_short), icon_color=ui.GREEN)
|
||||
return await confirm(ctx, content, ButtonRequestType.ConfirmOutput)
|
||||
|
||||
|
||||
|
@ -51,7 +51,9 @@ async def verify_message(ctx, msg):
|
||||
if addr != address:
|
||||
raise wire.ProcessError('Invalid signature')
|
||||
|
||||
await require_confirm_verify_message(ctx, address, message)
|
||||
address_short = address[len(coin.cashaddr_prefix) + 1:] if coin.cashaddr_prefix is not None else address
|
||||
|
||||
await require_confirm_verify_message(ctx, address_short, message)
|
||||
|
||||
return Success(message='Message verified')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user