mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-11 07:50:57 +00:00
core/shamir: fix texts
This commit is contained in:
parent
5584939fd3
commit
81a1b26fad
@ -83,8 +83,8 @@ async def request_pin_ack(ctx, *args, **kwargs):
|
||||
|
||||
async def pin_mismatch():
|
||||
text = Text("PIN mismatch", ui.ICON_WRONG, ui.RED)
|
||||
text.normal("Entered PINs do not", "match each other.")
|
||||
text.normal("The PINs you entered", "do not match.")
|
||||
text.normal("")
|
||||
text.normal("Please, try again...")
|
||||
text.normal("Please try again.")
|
||||
popup = Popup(text, 3000) # show for 3 seconds
|
||||
await popup
|
||||
|
@ -115,9 +115,9 @@ async def _show_confirmation_success(
|
||||
):
|
||||
if share_index is None or num_of_shares is None or share_index == num_of_shares - 1:
|
||||
if slip39:
|
||||
subheader = ("You finished verifying", "your recovery shares.")
|
||||
subheader = ("You have finished", "verifying your", "recovery shares.")
|
||||
else:
|
||||
subheader = ("You finished verifying", "your recovery seed.")
|
||||
subheader = ("You have finished", "verifying your", "recovery seed.")
|
||||
text = []
|
||||
else:
|
||||
subheader = ("Recovery share #%s" % (share_index + 1), "checked successfully.")
|
||||
|
@ -25,7 +25,7 @@ async def recovery_device(ctx: wire.Context, msg: RecoveryDevice) -> Success:
|
||||
if not msg.dry_run:
|
||||
title = "Recovery mode"
|
||||
text = Text(title, ui.ICON_RECOVERY)
|
||||
text.normal("Do you really want to", "recover the wallet?", "")
|
||||
text.normal("Do you really want to", "recover a wallet?", "")
|
||||
else:
|
||||
title = "Seed check"
|
||||
text = Text(title, ui.ICON_RECOVERY)
|
||||
|
@ -76,7 +76,7 @@ async def _finish_recovery_dry_run(
|
||||
== storage.recovery.get_slip39_iteration_exponent()
|
||||
)
|
||||
|
||||
await layout.show_dry_run_result(ctx, result)
|
||||
await layout.show_dry_run_result(ctx, result, mnemonic_type)
|
||||
|
||||
storage.recovery.end_progress()
|
||||
|
||||
|
@ -86,25 +86,41 @@ async def request_mnemonic(
|
||||
return " ".join(words)
|
||||
|
||||
|
||||
async def show_dry_run_result(ctx: wire.Context, result: bool) -> None:
|
||||
async def show_dry_run_result(
|
||||
ctx: wire.Context, result: bool, mnemonic_type: int
|
||||
) -> None:
|
||||
if result:
|
||||
await show_success(
|
||||
ctx,
|
||||
(
|
||||
if mnemonic_type == mnemonic.TYPE_SLIP39:
|
||||
text = (
|
||||
"The entered recovery",
|
||||
"seed is valid and matches",
|
||||
"the one in the device.",
|
||||
),
|
||||
)
|
||||
"shares are valid and",
|
||||
"match what is currently",
|
||||
"in the device.",
|
||||
)
|
||||
else:
|
||||
text = (
|
||||
"The entered recovery",
|
||||
"seed is valid and",
|
||||
"matches the one",
|
||||
"in the device.",
|
||||
)
|
||||
await show_success(ctx, text, button="Continue")
|
||||
else:
|
||||
await show_warning(
|
||||
ctx,
|
||||
(
|
||||
if mnemonic_type == mnemonic.TYPE_SLIP39:
|
||||
text = (
|
||||
"The entered recovery",
|
||||
"seed is valid but does not",
|
||||
"match the one in the device.",
|
||||
),
|
||||
)
|
||||
"shares are valid but",
|
||||
"do not match what is",
|
||||
"currently in the device.",
|
||||
)
|
||||
else:
|
||||
text = (
|
||||
"The entered recovery",
|
||||
"seed is valid but does",
|
||||
"not match the one",
|
||||
"in the device.",
|
||||
)
|
||||
await show_warning(ctx, text, button="Continue")
|
||||
|
||||
|
||||
async def show_dry_run_different_type(ctx: wire.Context) -> None:
|
||||
@ -136,13 +152,9 @@ async def show_keyboard_info(ctx: wire.Context) -> None:
|
||||
|
||||
async def show_invalid_mnemonic(ctx, mnemonic_type: int):
|
||||
if mnemonic_type == mnemonic.TYPE_SLIP39:
|
||||
await show_warning(
|
||||
ctx, ("You have entered", "a recovery share", "that is not valid.")
|
||||
)
|
||||
await show_warning(ctx, ("You have entered", "an invalid recovery", "share."))
|
||||
else:
|
||||
await show_warning(
|
||||
ctx, ("You have entered", "a recovery seed", "that is not valid.")
|
||||
)
|
||||
await show_warning(ctx, ("You have entered", "an invalid recovery", "seed."))
|
||||
|
||||
|
||||
async def show_share_already_added(ctx):
|
||||
|
Loading…
Reference in New Issue
Block a user