mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-25 17:09:44 +00:00
feat(core/ui): T3T1 separate wallet created screen
Commit adds separate call of success screen after wallet is created. This is to ensure the success is shown even when skip_backup is set in the protob msg. [no changelog]
This commit is contained in:
parent
dd70b438d3
commit
936fe1aea9
@ -33,7 +33,11 @@ async def reset_device(msg: ResetDevice) -> Success:
|
||||
from trezor.crypto import bip39, random
|
||||
from trezor.messages import EntropyAck, EntropyRequest, Success
|
||||
from trezor.pin import render_empty_loader
|
||||
from trezor.ui.layouts import confirm_reset_device, prompt_backup
|
||||
from trezor.ui.layouts import (
|
||||
confirm_reset_device,
|
||||
prompt_backup,
|
||||
show_wallet_created_success,
|
||||
)
|
||||
from trezor.wire.context import call
|
||||
|
||||
from apps.common.request_pin import request_pin_confirm
|
||||
@ -93,6 +97,9 @@ async def reset_device(msg: ResetDevice) -> Success:
|
||||
# Otherwise, we try to do it.
|
||||
perform_backup = not msg.no_backup and not msg.skip_backup
|
||||
|
||||
# Wallet created successfully
|
||||
await show_wallet_created_success()
|
||||
|
||||
# If doing backup, ask the user to confirm.
|
||||
if perform_backup:
|
||||
perform_backup = await prompt_backup()
|
||||
|
@ -366,18 +366,17 @@ async def confirm_reset_device(_title: str, recovery: bool = False) -> None:
|
||||
)
|
||||
|
||||
|
||||
async def prompt_backup() -> bool:
|
||||
# TODO: should we move this to `flow_prompt_backup`?
|
||||
async def show_wallet_created_success() -> None:
|
||||
await interact(
|
||||
RustLayout(
|
||||
trezorui2.show_success(
|
||||
title=TR.backup__new_wallet_created, description=None
|
||||
)
|
||||
trezorui2.show_success(title=TR.backup__new_wallet_created, description="")
|
||||
),
|
||||
"backup_device",
|
||||
ButtonRequestType.ResetDevice,
|
||||
)
|
||||
|
||||
|
||||
async def prompt_backup() -> bool:
|
||||
result = await interact(
|
||||
RustLayout(trezorui2.flow_prompt_backup()),
|
||||
"backup_device",
|
||||
|
@ -465,6 +465,11 @@ def confirm_reset_device(
|
||||
)
|
||||
|
||||
|
||||
async def show_wallet_created_success() -> None:
|
||||
# not shown on model R
|
||||
return None
|
||||
|
||||
|
||||
async def prompt_backup() -> bool:
|
||||
br_type = "backup_device"
|
||||
br_code = ButtonRequestType.ResetDevice
|
||||
|
@ -383,6 +383,11 @@ def confirm_reset_device(title: str, recovery: bool = False) -> Awaitable[None]:
|
||||
)
|
||||
|
||||
|
||||
async def show_wallet_created_success() -> None:
|
||||
# not shown on model T
|
||||
return None
|
||||
|
||||
|
||||
# TODO cleanup @ redesign
|
||||
async def prompt_backup() -> bool:
|
||||
result = await interact(
|
||||
|
Loading…
Reference in New Issue
Block a user