mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 12:28:09 +00:00
nem/layout: confirm payload (todo)
This commit is contained in:
parent
9674a58db0
commit
302ec82d3d
@ -24,6 +24,12 @@ async def require_confirm_fee(ctx, value, fee):
|
||||
await require_confirm(ctx, content, ButtonRequestType.ConfirmOutput)
|
||||
|
||||
|
||||
async def require_confirm_action(ctx):
|
||||
content = Text('Send unencrypted transaction?', ui.ICON_SEND)
|
||||
async def require_confirm_action(ctx, payload, encrypt=False):
|
||||
if encrypt:
|
||||
content = Text("Send payload encrypted?", ui.ICON_SEND,
|
||||
ui.NORMAL, payload)
|
||||
else:
|
||||
content = Text("Send payload unencrypted?", ui.ICON_SEND,
|
||||
ui.NORMAL, payload,
|
||||
icon_color=ui.RED)
|
||||
await require_confirm(ctx, content, ButtonRequestType.ConfirmOutput)
|
||||
|
@ -40,8 +40,7 @@ async def nem_sign_tx(ctx, msg: NEMSignTx):
|
||||
nem_transaction_write_mosaic(tx, mosaic.namespace, mosaic.mosaic, mosaic.quantity)
|
||||
|
||||
if payload: # confirm unencrypted
|
||||
# todo encrypted vs unencrypted
|
||||
await require_confirm_action(ctx) # todo
|
||||
await require_confirm_action(ctx, msg.transfer.payload, encrypted)
|
||||
|
||||
await require_confirm_fee(ctx, msg.transfer.amount, msg.transaction.fee) # todo
|
||||
await require_confirm_tx(ctx, msg.transfer.recipient, msg.transfer.amount) # todo
|
||||
|
Loading…
Reference in New Issue
Block a user