core/slip39: add different wording for BIP/SLIP39 in backup warining

pull/297/head
Tomas Susanka 5 years ago
parent 9b2167a138
commit f78e75bc38

@ -13,7 +13,7 @@ async def backup_device(ctx, msg):
raise wire.ProcessError("Seed already backed up")
# warn user about mnemonic safety
await layout.bip39_show_backup_warning(ctx)
await layout.show_backup_warning(ctx, "Back up your seed", "I understand")
storage.set_unfinished_backup(True)
storage.set_backed_up()

@ -46,19 +46,6 @@ async def show_internal_entropy(ctx, entropy: bytes):
await require_confirm(ctx, text, ButtonRequestType.ResetDevice)
async def show_backup_success(ctx):
text = Text("Backup is done!", ui.ICON_CONFIRM, ui.GREEN)
text.normal(
"Never make a digital",
"copy of your recovery",
"shares and never upload",
"them online!",
)
await require_confirm(
ctx, text, ButtonRequestType.ResetDevice, confirm="Finish backup", cancel=None
)
async def confirm_backup(ctx):
text = Text("Back up wallet", ui.ICON_RESET, new_lines=False)
text.bold("New wallet created")
@ -169,6 +156,27 @@ async def _show_confirmation_failure(ctx, share_index):
)
async def show_backup_warning(ctx, header: str, confirm_text: str, slip39=False):
text = Text(header, ui.ICON_NOCOPY)
if slip39:
text.normal(
"Never make a digital",
"copy of your recovery",
"shares and never upload",
"them online!",
)
else:
text.normal(
"Never make a digital",
"copy of your recovery",
"seed and never upload",
"it online!",
)
await require_confirm(
ctx, text, ButtonRequestType.ResetDevice, confirm_text, cancel=None
)
# BIP39
# ===
@ -188,19 +196,6 @@ async def bip39_show_and_confirm_mnemonic(ctx, mnemonic: str):
await _show_confirmation_failure(ctx, None)
async def bip39_show_backup_warning(ctx):
text = Text("Backup your seed", ui.ICON_NOCOPY)
text.normal(
"Never make a digital",
"copy of your recovery",
"shares and never upload",
"them online!",
)
await require_confirm(
ctx, text, ButtonRequestType.ResetDevice, confirm="I understand", cancel=None
)
async def _bip39_show_mnemonic(ctx, words: list):
# split mnemonic words into pages
PER_PAGE = const(4)

@ -75,7 +75,9 @@ async def reset_device(ctx, msg):
# if we backed up the wallet, show success message
if not msg.no_backup and not msg.skip_backup:
await layout.show_backup_success(ctx)
await layout.show_backup_warning(
ctx, "Backup is done!", "Finish backup", msg.slip39
)
return Success(message="Initialized")

Loading…
Cancel
Save