mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-22 05:10:56 +00:00
core/apps: await require_confirm should be called without return
This commit is contained in:
parent
2e2f5fd421
commit
a808cc9190
@ -15,7 +15,7 @@ async def require_confirm_tx(ctx, to, value):
|
||||
text.bold(format_coin_amount(value))
|
||||
text.normal("to")
|
||||
text.mono(*split_address(to))
|
||||
return await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_delegate_registration(ctx, delegate_name):
|
||||
@ -23,13 +23,13 @@ async def require_confirm_delegate_registration(ctx, delegate_name):
|
||||
text.normal("Do you really want to")
|
||||
text.normal("register a delegate?")
|
||||
text.bold(*chunks(delegate_name, 20))
|
||||
return await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_vote_tx(ctx, votes):
|
||||
text = Text("Confirm transaction", ui.ICON_SEND, ui.GREEN)
|
||||
text.normal(*get_vote_tx_text(votes))
|
||||
return await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_public_key(ctx, public_key):
|
||||
@ -41,7 +41,7 @@ async def require_confirm_multisig(ctx, multisignature):
|
||||
text.normal("Keys group length: %s" % len(multisignature.keys_group))
|
||||
text.normal("Life time: %s" % multisignature.life_time)
|
||||
text.normal("Min: %s" % multisignature.min)
|
||||
return await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_fee(ctx, value, fee):
|
||||
|
@ -15,19 +15,19 @@ DUMMY_PAYMENT_ID = b"\x00" * 8
|
||||
async def require_confirm_watchkey(ctx):
|
||||
content = Text("Confirm export", ui.ICON_SEND, ui.GREEN)
|
||||
content.normal("Do you really want to", "export watch-only", "credentials?")
|
||||
return await require_confirm(ctx, content, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, content, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_keyimage_sync(ctx):
|
||||
content = Text("Confirm ki sync", ui.ICON_SEND, ui.GREEN)
|
||||
content.normal("Do you really want to", "sync key images?")
|
||||
return await require_confirm(ctx, content, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, content, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_live_refresh(ctx):
|
||||
content = Text("Confirm refresh", ui.ICON_SEND, ui.GREEN)
|
||||
content.normal("Do you really want to", "start refresh?")
|
||||
return await require_confirm(ctx, content, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, content, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_tx_key(ctx, export_key=False):
|
||||
@ -40,7 +40,7 @@ async def require_confirm_tx_key(ctx, export_key=False):
|
||||
txt.append("for tx_proof?")
|
||||
|
||||
content.normal(*txt)
|
||||
return await require_confirm(ctx, content, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, content, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_transaction(ctx, state, tsx_data, network_type):
|
||||
|
@ -24,9 +24,8 @@ async def require_confirm_destination_tag(ctx, tag):
|
||||
|
||||
|
||||
async def require_confirm_tx(ctx, to, value):
|
||||
|
||||
text = Text("Confirm sending", ui.ICON_SEND, ui.GREEN)
|
||||
text.bold(format_amount(value, helpers.DECIMALS) + " XRP")
|
||||
text.normal("to")
|
||||
text.mono(*split_address(to))
|
||||
return await require_hold_to_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
await require_hold_to_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
|
@ -28,4 +28,4 @@ async def _show_tezos_pubkey(ctx, pubkey):
|
||||
lines = chunks(pubkey, 18)
|
||||
text = Text("Confirm public key", ui.ICON_RECEIVE, ui.GREEN)
|
||||
text.mono(*lines)
|
||||
return await require_confirm(ctx, text, code=ButtonRequestType.PublicKey)
|
||||
await require_confirm(ctx, text, code=ButtonRequestType.PublicKey)
|
||||
|
@ -14,7 +14,7 @@ async def require_confirm_tx(ctx, to, value):
|
||||
text.bold(format_tezos_amount(value))
|
||||
text.normal("to")
|
||||
text.mono(*split_address(to))
|
||||
return await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_fee(ctx, value, fee):
|
||||
@ -30,7 +30,7 @@ async def require_confirm_origination(ctx, address):
|
||||
text = Text("Confirm origination", ui.ICON_SEND, ui.ORANGE)
|
||||
text.normal("Address:")
|
||||
text.mono(*split_address(address))
|
||||
return await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_origination_fee(ctx, balance, fee):
|
||||
@ -46,7 +46,7 @@ async def require_confirm_delegation_baker(ctx, baker):
|
||||
text = Text("Confirm delegation", ui.ICON_SEND, ui.BLUE)
|
||||
text.normal("Baker address:")
|
||||
text.mono(*split_address(baker))
|
||||
return await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
await require_confirm(ctx, text, ButtonRequestType.SignTx)
|
||||
|
||||
|
||||
async def require_confirm_set_delegate(ctx, fee):
|
||||
|
Loading…
Reference in New Issue
Block a user