Skip to content

Commit

Permalink
Merge pull request #170 from kdmukai/0.5.0-rc1
Browse files Browse the repository at this point in the history
0.5.0 "Final" updates
  • Loading branch information
SeedSigner authored Apr 5, 2022
2 parents 90f56a3 + 795d911 commit 8ec6ca3
Show file tree
Hide file tree
Showing 25 changed files with 867 additions and 464 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ embit==0.4.10
numpy==1.21.1
picamera==1.13
Pillow==8.2.0
-e git+https://github.com/kdmukai/pyzbar.git@c3c237821c6a20b17953efe59b90df0b514a1c03#egg=pyzbar
-e git+https://github.com/seedsigner/pyzbar.git@c3c237821c6a20b17953efe59b90df0b514a1c03#egg=pyzbar
qrcode==7.3.1
RPi.GPIO==0.7.0
six==1.16.0
Expand Down
68 changes: 6 additions & 62 deletions src/seedsigner/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
from typing import List

from seedsigner.gui.renderer import Renderer
from seedsigner.gui.screens.screen import WarningScreen
from seedsigner.hardware.buttons import HardwareButtons
from seedsigner.views.screensaver import ScreensaverView
from seedsigner.views.screensaver import ScreensaverScreen
from seedsigner.views.view import Destination, NotYetImplementedView, UnhandledExceptionView

from .models import Seed, SeedStorage, Settings, Singleton, PSBTParser
Expand Down Expand Up @@ -49,7 +48,7 @@ class Controller(Singleton):
rather than at the top in order avoid circular imports.
"""

VERSION = "0.5.0 Pre-Release 3"
VERSION = "0.5.0-rc1"

# Declare class member vars with type hints to enable richer IDE support throughout
# the code.
Expand Down Expand Up @@ -81,7 +80,7 @@ class Controller(Singleton):
resume_main_flow: str = None

back_stack: BackStack = None
screensaver: ScreensaverView = None
screensaver: ScreensaverScreen = None


@classmethod
Expand Down Expand Up @@ -132,7 +131,7 @@ def configure_instance(cls, disable_hardware=False):
# Configure the Renderer
Renderer.configure_instance()

controller.screensaver = ScreensaverView(controller.buttons)
controller.screensaver = ScreensaverScreen(controller.buttons)

controller.back_stack = BackStack()

Expand Down Expand Up @@ -180,20 +179,11 @@ def clear_back_stack(self):

def start(self) -> None:
from .views import MainMenuView, BackStackView
from .views.screensaver import OpeningSplashView
from .views.screensaver import OpeningSplashScreen

opening_splash = OpeningSplashView()
opening_splash = OpeningSplashScreen()
opening_splash.start()

# TODO: Remove for v0.5.0 production release
WarningScreen(
title="Warning",
status_headline="Pre-Release Code",
text="Do not use this with real funds or to create new secure keys!",
show_back_button=False,
).display()


""" Class references can be stored as variables in python!
This loop receives a View class to execute and stores it in the `View_cls`
Expand Down Expand Up @@ -324,49 +314,3 @@ def handle_exception(self, e) -> Destination:
exception_msg,
]
return Destination(UnhandledExceptionView, view_args={"error": error}, clear_history=True)

"""
###
### Seed Tools Controller Naviation/Launcher
###
### Create a Seed w/ Dice Screen
def show_create_seed_with_dice_tool(self) -> int:
seed = Seed(wordlist=self.settings.wordlist)
ret_val = True
while True:
seed.mnemonic = self.seed_tools_view.display_generate_seed_from_dice()
if seed:
break
else:
return Path.SEED_TOOLS_SUB_MENU
# display seed phrase (24 words)
while True:
ret_val = self.seed_tools_view.display_seed_phrase(seed.mnemonic_list, show_qr_option=True)
if ret_val == True:
break
else:
# no-op; can't back out of the seed phrase view
pass
# Ask to save seed
if self.storage.slot_avaliable():
r = self.renderer.display_generic_selection_menu(["Yes", "No"], "Save Seed?")
if r == 1: #Yes
slot_num = self.menu_view.display_saved_seed_menu(self.storage,2,None)
if slot_num in (1,2,3):
self.storage.add_seed(seed, slot_num)
self.renderer.draw_modal(["Seed Valid", "Saved to Slot #" + str(slot_num)], "", "Right to Main Menu")
input = self.buttons.wait_for([B.KEY_RIGHT])
return Path.MAIN_MENU
"""
Loading

0 comments on commit 8ec6ca3

Please sign in to comment.