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

trezor.ui.confirm: content is required

This commit is contained in:
Jan Pochyla 2017-06-20 12:03:11 +02:00
parent bcd94ecbc1
commit 3318ed22f5
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ signal = loop.Signal()
@unimport @unimport
async def confirm(session_id, content=None, code=None, *args, **kwargs): async def confirm(session_id, content, code=None, *args, **kwargs):
from trezor.ui.confirm import ConfirmDialog, CONFIRMED from trezor.ui.confirm import ConfirmDialog, CONFIRMED
from trezor.messages.ButtonRequest import ButtonRequest from trezor.messages.ButtonRequest import ButtonRequest
from trezor.messages.ButtonRequestType import Other from trezor.messages.ButtonRequestType import Other
@ -24,7 +24,7 @@ async def confirm(session_id, content=None, code=None, *args, **kwargs):
@unimport @unimport
async def hold_to_confirm(session_id, content=None, code=None, *args, **kwargs): async def hold_to_confirm(session_id, content, code=None, *args, **kwargs):
from trezor.ui.confirm import HoldToConfirmDialog, CONFIRMED from trezor.ui.confirm import HoldToConfirmDialog, CONFIRMED
from trezor.messages.ButtonRequest import ButtonRequest from trezor.messages.ButtonRequest import ButtonRequest
from trezor.messages.ButtonRequestType import Other from trezor.messages.ButtonRequestType import Other

View File

@ -12,7 +12,7 @@ CANCELLED = const(2)
class ConfirmDialog(Widget): class ConfirmDialog(Widget):
def __init__(self, content=None, confirm='Confirm', cancel='Cancel'): def __init__(self, content, confirm='Confirm', cancel='Cancel'):
self.content = content self.content = content
if cancel is not None: if cancel is not None:
self.confirm = Button((121, 240 - 48, 119, 48), confirm, self.confirm = Button((121, 240 - 48, 119, 48), confirm,