update comment

Co-authored-by: kdmukai <934746+kdmukai@users.noreply.github.com>
This commit is contained in:
Kshitij
2026-06-02 13:19:24 +05:30
committed by GitHub
co-authored by kdmukai
parent 60cb1376c0
commit 94485e525c
+4 -4
View File
@@ -226,10 +226,10 @@ class SeedMnemonicEntryView(View):
)
if ret == RET_CODE__BACK_BUTTON:
# RET_CODE__BACK_BUTTON can happen in two ways here:
# 1. Backing out of the very first word completely aborts the mnemonic entry.
# 2. Backing out of a subsequent word just returns to the previous word.
# In both cases we return to BackStackView, but for case #1 we must also discard.
# This handles two possible scenarios:
# 1. Backing out of the first word cancels the mnemonic entry process;
return to whichever `View` routed us here initially.
# 2. Backing out of the current word returns to the previous word.
if self.cur_word_index == 0:
self.controller.storage.discard_pending_mnemonic()
return Destination(BackStackView)