Skip to content

Commit

Permalink
Merge pull request #163 from kdmukai/0.5.0-pre2
Browse files Browse the repository at this point in the history
Bugfix on CompactSeedQR disabled for 12-word seeds
  • Loading branch information
SeedSigner committed Mar 15, 2022
2 parents 18c18a6 + ca64afe commit c8bdb6b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/seedsigner/controller.py
Expand Up @@ -144,8 +144,8 @@ def start(self) -> None:
from .views import Destination, MainMenuView, BackStackView
from .views.screensaver import OpeningSplashView

# opening_splash = OpeningSplashView()
# opening_splash.start()
opening_splash = OpeningSplashView()
opening_splash.start()

# TODO: Remove for v0.5.0 production release
WarningScreen(
Expand Down
23 changes: 12 additions & 11 deletions src/seedsigner/views/seed_views.py
Expand Up @@ -769,17 +769,6 @@ def __init__(self, seed_num: int):


def run(self):
if self.settings.get_value(SettingsConstants.SETTING__COMPACT_SEEDQR) != SettingsConstants.OPTION__ENABLED:
# Only configured for standard SeedQR
return Destination(
SeedTranscribeSeedQRWarningView,
view_args={
"seed_num": self.seed_num,
"seedqr_format": QRType.SEED__SEEDQR,
},
skip_current_view=True,
)

seed = self.controller.get_seed(self.seed_num)
if len(seed.mnemonic_list) == 12:
STANDARD = "Standard: 25x25"
Expand All @@ -792,6 +781,18 @@ def run(self):
num_modules_standard = 29
num_modules_compact = 25

if self.settings.get_value(SettingsConstants.SETTING__COMPACT_SEEDQR) != SettingsConstants.OPTION__ENABLED:
# Only configured for standard SeedQR
return Destination(
SeedTranscribeSeedQRWarningView,
view_args={
"seed_num": self.seed_num,
"seedqr_format": QRType.SEED__SEEDQR,
"num_modules": num_modules_standard,
},
skip_current_view=True,
)

button_data = [STANDARD, COMPACT]

selected_menu_num = seed_screens.SeedTranscribeSeedQRFormatScreen(
Expand Down

0 comments on commit c8bdb6b

Please sign in to comment.