Skip to content

Commit

Permalink
Bugfix for manual seed entry after scanning psbt
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmukai committed May 25, 2022
1 parent 8df1271 commit 2f6629b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/seedsigner/views/psbt_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def run(self):
seeds = self.controller.storage.seeds

SCAN_SEED = ("Scan a seed", FontAwesomeIconConstants.QRCODE)
ENTER_WORDS = "Enter 12/24 words"
TYPE_12WORD = ("Enter 12-word seed", FontAwesomeIconConstants.KEYBOARD)
TYPE_24WORD = ("Enter 24-word seed", FontAwesomeIconConstants.KEYBOARD)
button_data = []
for seed in seeds:
button_str = seed.get_fingerprint(self.settings.get_value(SettingsConstants.SETTING__NETWORK))
Expand All @@ -45,7 +46,8 @@ def run(self):
pass
button_data.append((button_str, SeedSignerCustomIconConstants.FINGERPRINT, "blue"))
button_data.append(SCAN_SEED)
button_data.append(ENTER_WORDS)
button_data.append(TYPE_12WORD)
button_data.append(TYPE_24WORD)

selected_menu_num = ButtonListScreen(
title="Select Signer",
Expand All @@ -68,8 +70,12 @@ def run(self):
from seedsigner.views.scan_views import ScanView
return Destination(ScanView)

elif button_data[selected_menu_num] == ENTER_WORDS:
elif button_data[selected_menu_num] in [TYPE_12WORD, TYPE_24WORD]:
from seedsigner.views.seed_views import SeedMnemonicEntryView
if button_data[selected_menu_num] == TYPE_12WORD:
self.controller.storage.init_pending_mnemonic(12)
else:
self.controller.storage.init_pending_mnemonic(24)
return Destination(SeedMnemonicEntryView)


Expand Down

0 comments on commit 2f6629b

Please sign in to comment.