mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-15 20:19:23 +00:00
src/apps/management: reset_device with no layout resets homescreen
This commit is contained in:
parent
b77646904b
commit
144e2013bd
@ -5,6 +5,7 @@ from trezor.messages import ButtonRequestType, FailureType, wire_types
|
||||
from trezor.messages.ButtonRequest import ButtonRequest
|
||||
from trezor.messages.EntropyRequest import EntropyRequest
|
||||
from trezor.messages.Success import Success
|
||||
from trezor import workflow
|
||||
from trezor.pin import pin_to_int
|
||||
from trezor.ui.confirm import HoldToConfirmDialog
|
||||
from trezor.ui.mnemonic import MnemonicKeyboard
|
||||
@ -79,6 +80,9 @@ async def reset_device(ctx, msg):
|
||||
# show success message
|
||||
if not msg.skip_backup:
|
||||
await show_success(ctx)
|
||||
else:
|
||||
# trigger reload of homescreen
|
||||
workflow.restartdefault()
|
||||
|
||||
return Success(message='Initialized')
|
||||
|
||||
|
@ -34,6 +34,13 @@ def startdefault(handler):
|
||||
loop.schedule(default)
|
||||
|
||||
|
||||
def restartdefault():
|
||||
global default_handler
|
||||
d = default_handler
|
||||
closedefault()
|
||||
startdefault(d)
|
||||
|
||||
|
||||
def onlayoutstart(l):
|
||||
closedefault()
|
||||
layouts.append(l)
|
||||
|
Loading…
Reference in New Issue
Block a user