1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

wallet: use hold to confirm the tx summary

This commit is contained in:
Jan Pochyla 2016-11-15 11:53:03 +01:00
parent a798a07220
commit abb6f284ca

View File

@ -24,12 +24,12 @@ async def confirm_total(session_id, spending, fee, coin):
from trezor import ui from trezor import ui
from trezor.ui.text import Text from trezor.ui.text import Text
from trezor.messages.ButtonRequestType import SignTx from trezor.messages.ButtonRequestType import SignTx
from ..common.confirm import confirm from ..common.confirm import hold_to_confirm
content = Text('Confirm transaction', ui.ICON_RESET, content = Text('Confirm transaction', ui.ICON_RESET,
'Sending: %s' % format_amount(spending, coin), 'Sending: %s' % format_amount(spending, coin),
'Fee: %s' % format_amount(fee, coin)) 'Fee: %s' % format_amount(fee, coin))
return await confirm(session_id, content, SignTx) return await hold_to_confirm(session_id, content, SignTx)
@unimport @unimport
@ -59,6 +59,5 @@ async def layout_sign_tx(message, session_id):
elif isinstance(req, signtx.UiConfirmTotal): elif isinstance(req, signtx.UiConfirmTotal):
res = await confirm_total(session_id, req.spending, req.fee, req.coin) res = await confirm_total(session_id, req.spending, req.fee, req.coin)
else: else:
print(req)
raise ValueError('Invalid signing instruction') raise ValueError('Invalid signing instruction')
return req return req