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:
parent
bcd94ecbc1
commit
3318ed22f5
@ -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
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user