diff --git a/enclosures/open_pill_mini/Main_Chassis.stl b/enclosures/open_pill_mini/Main_Chassis.stl new file mode 100644 index 00000000..805dbaea Binary files /dev/null and b/enclosures/open_pill_mini/Main_Chassis.stl differ diff --git a/enclosures/open_pill_mini_w_coverplate/Buttons.stl b/enclosures/open_pill_mini_w_coverplate/Buttons.stl new file mode 100644 index 00000000..f6e89c44 Binary files /dev/null and b/enclosures/open_pill_mini_w_coverplate/Buttons.stl differ diff --git a/enclosures/open_pill_mini_w_coverplate/Lid.stl b/enclosures/open_pill_mini_w_coverplate/Lid.stl new file mode 100644 index 00000000..356ef499 Binary files /dev/null and b/enclosures/open_pill_mini_w_coverplate/Lid.stl differ diff --git a/enclosures/open_pill_mini_w_coverplate/Main_Chassis.stl b/enclosures/open_pill_mini_w_coverplate/Main_Chassis.stl new file mode 100644 index 00000000..7f31bfd6 Binary files /dev/null and b/enclosures/open_pill_mini_w_coverplate/Main_Chassis.stl differ diff --git a/enclosures/open_pill_mini_w_coverplate/Thumbstick_PLA.stl b/enclosures/open_pill_mini_w_coverplate/Thumbstick_PLA.stl new file mode 100644 index 00000000..c22c02c4 Binary files /dev/null and b/enclosures/open_pill_mini_w_coverplate/Thumbstick_PLA.stl differ diff --git a/enclosures/open_pill_mini_w_coverplate/Thumbstick_TPU.stl b/enclosures/open_pill_mini_w_coverplate/Thumbstick_TPU.stl new file mode 100644 index 00000000..0de57906 Binary files /dev/null and b/enclosures/open_pill_mini_w_coverplate/Thumbstick_TPU.stl differ diff --git a/src/seedsigner/gui/screens/scan_screens.py b/src/seedsigner/gui/screens/scan_screens.py index 1b29af27..6484fec1 100644 --- a/src/seedsigner/gui/screens/scan_screens.py +++ b/src/seedsigner/gui/screens/scan_screens.py @@ -18,7 +18,7 @@ from ..components import BaseComponent, Button, GUIConstants, Fonts, IconButton, @dataclass class ScanScreen(BaseScreen): decoder: DecodeQR = None - instructions_text: str = "Scan a QR code" + instructions_text: str = "< back | Scan a QR code" resolution: Tuple[int,int] = (480, 480) framerate: int = 12 render_rect: Tuple[int,int,int,int] = None diff --git a/src/seedsigner/models/settings_definition.py b/src/seedsigner/models/settings_definition.py index dc05713b..6c2af745 100644 --- a/src/seedsigner/models/settings_definition.py +++ b/src/seedsigner/models/settings_definition.py @@ -365,7 +365,12 @@ class SettingsDefinition: display_name="Coordinator software", type=SettingsConstants.TYPE__MULTISELECT, selection_options=SettingsConstants.ALL_COORDINATORS, - default_value=SettingsConstants.ALL_COORDINATORS), + default_value=[ + SettingsConstants.COORDINATOR__BLUE_WALLET, + SettingsConstants.COORDINATOR__NUNCHUK, + SettingsConstants.COORDINATOR__SPARROW, + SettingsConstants.COORDINATOR__SPECTER_DESKTOP, + ]), SettingsEntry(category=SettingsConstants.CATEGORY__SYSTEM, attr_name=SettingsConstants.SETTING__BTC_DENOMINATION, diff --git a/src/seedsigner/views/psbt_views.py b/src/seedsigner/views/psbt_views.py index a725c612..59bda243 100644 --- a/src/seedsigner/views/psbt_views.py +++ b/src/seedsigner/views/psbt_views.py @@ -40,19 +40,17 @@ class PSBTSelectSeedView(View): if not PSBTParser.has_matching_input_fingerprint(psbt=self.controller.psbt, seed=seed, network=self.settings.get_value(SettingsConstants.SETTING__NETWORK)): # Doesn't look like this seed can sign the current PSBT button_str += " (?)" - - if seed.passphrase is not None: - # TODO: Include lock icon on right side of button - pass + button_data.append((button_str, SeedSignerCustomIconConstants.FINGERPRINT, "blue")) + button_data.append(SCAN_SEED) button_data.append(TYPE_12WORD) button_data.append(TYPE_24WORD) if self.controller.psbt_seed: - if PSBTParser.has_matching_input_fingerprint(psbt=self.controller.psbt, seed=self.controller.psbt_seed, network=self.settings.get_value(SettingsConstants.SETTING__NETWORK)): - # skip the seed prompt if a seed was previous selected and has matching input fingerprint - return Destination(PSBTOverviewView) + if PSBTParser.has_matching_input_fingerprint(psbt=self.controller.psbt, seed=self.controller.psbt_seed, network=self.settings.get_value(SettingsConstants.SETTING__NETWORK)): + # skip the seed prompt if a seed was previous selected and has matching input fingerprint + return Destination(PSBTOverviewView) selected_menu_num = ButtonListScreen( title="Select Signer", diff --git a/src/seedsigner/views/scan_views.py b/src/seedsigner/views/scan_views.py index d263d261..5af972c8 100644 --- a/src/seedsigner/views/scan_views.py +++ b/src/seedsigner/views/scan_views.py @@ -46,7 +46,7 @@ class ScanView(View): psbt = self.decoder.get_psbt() self.controller.psbt = psbt self.controller.psbt_parser = None - return Destination(PSBTSelectSeedView) + return Destination(PSBTSelectSeedView, skip_current_view=True) elif self.decoder.is_settings: from seedsigner.models.settings import Settings @@ -83,7 +83,7 @@ class ScanView(View): return Destination(NotYetImplementedView) self.controller.multisig_wallet_descriptor = descriptor - return Destination(MultisigWalletDescriptorView) + return Destination(MultisigWalletDescriptorView, skip_current_view=True) elif self.decoder.is_address: from seedsigner.views.seed_views import AddressVerificationStartView @@ -92,6 +92,7 @@ class ScanView(View): return Destination( AddressVerificationStartView, + skip_current_view=True, view_args={ "address": address, "script_type": script_type, @@ -102,6 +103,9 @@ class ScanView(View): else: return Destination(NotYetImplementedView) + elif self.decoder.is_invalid: + raise Exception("QRCode not recognized or not yet supported.") + return Destination(MainMenuView) diff --git a/src/seedsigner/views/seed_views.py b/src/seedsigner/views/seed_views.py index 77ae63a1..aca803ba 100644 --- a/src/seedsigner/views/seed_views.py +++ b/src/seedsigner/views/seed_views.py @@ -36,8 +36,7 @@ class SeedsMenuView(View): self.seeds = [] for seed in self.controller.storage.seeds: self.seeds.append({ - "fingerprint": seed.get_fingerprint(self.settings.get_value(SettingsConstants.SETTING__NETWORK)), - "has_passphrase": seed.passphrase is not None + "fingerprint": seed.get_fingerprint(self.settings.get_value(SettingsConstants.SETTING__NETWORK)) }) @@ -373,6 +372,14 @@ class SeedOptionsView(View): addr = self.controller.unverified_address["address"][:7] VERIFY_ADDRESS += f" {addr}" button_data.append(VERIFY_ADDRESS) + + if self.controller.psbt: + if PSBTParser.has_matching_input_fingerprint(self.controller.psbt, self.seed, network=self.settings.get_value(SettingsConstants.SETTING__NETWORK)): + if self.controller.resume_main_flow and self.controller.resume_main_flow == Controller.FLOW__PSBT: + # Re-route us directly back to the start of the PSBT flow + self.controller.resume_main_flow = None + self.controller.psbt_seed = self.seed + return Destination(PSBTOverviewView, skip_current_view=True) button_data.append(SCAN_PSBT) @@ -522,6 +529,9 @@ class SeedExportXpubScriptTypeView(View): ).display() if selected_menu_num == RET_CODE__BACK_BUTTON: + # If previous view is SeedOptionsView then that should be where resume_main_flow started (otherwise it would have been skipped). + if len(self.controller.back_stack) >= 2 and self.controller.back_stack[-2].View_cls == SeedOptionsView: + self.controller.resume_main_flow = None return Destination(BackStackView) else: @@ -1387,14 +1397,14 @@ class AddressVerificationStartView(View): sig_type = SettingsConstants.MULTISIG if self.controller.multisig_wallet_descriptor: # Can jump straight to the brute-force verification View - destination = Destination(SeedAddressVerificationView) + destination = Destination(SeedAddressVerificationView, skip_current_view=True) else: self.controller.resume_main_flow = Controller.FLOW__VERIFY_MULTISIG_ADDR - destination = Destination(LoadMultisigWalletDescriptorView) + destination = Destination(LoadMultisigWalletDescriptorView, skip_current_view=True) else: sig_type = SettingsConstants.SINGLE_SIG - destination = Destination(SeedSingleSigAddressVerificationSelectSeedView) + destination = Destination(SeedSingleSigAddressVerificationSelectSeedView, skip_current_view=True) elif self.controller.unverified_address["script_type"] == SettingsConstants.TAPROOT: # TODO: add Taproot support @@ -1472,12 +1482,7 @@ class SeedSingleSigAddressVerificationSelectSeedView(View): for seed in seeds: button_str = seed.get_fingerprint(self.settings.get_value(SettingsConstants.SETTING__NETWORK)) - - if seed.passphrase is not None: - # TODO: Include lock icon on right side of button - pass button_data.append((button_str, SeedSignerCustomIconConstants.FINGERPRINT, "blue")) - text = "Select seed to verify" button_data.append(SCAN_SEED) diff --git a/src/seedsigner/views/tools_views.py b/src/seedsigner/views/tools_views.py index 2c5fa017..e7778bdf 100644 --- a/src/seedsigner/views/tools_views.py +++ b/src/seedsigner/views/tools_views.py @@ -433,10 +433,6 @@ class ToolsAddressExplorerSelectSourceView(View): seeds = self.controller.storage.seeds for seed in seeds: button_str = seed.get_fingerprint(self.settings.get_value(SettingsConstants.SETTING__NETWORK)) - - if seed.passphrase is not None: - # TODO: Include lock icon on right side of button - pass button_data.append((button_str, SeedSignerCustomIconConstants.FINGERPRINT, "blue")) button_data.append(SCAN_SEED) diff --git a/tests/test_controller.py b/tests/test_controller.py index 99c6f7b3..bd8b2c18 100644 --- a/tests/test_controller.py +++ b/tests/test_controller.py @@ -52,7 +52,7 @@ def test_missing_settings_get_defaults(reset_controller): assert controller.settings.get_value(SettingsConstants.SETTING__LANGUAGE) == SettingsConstants.LANGUAGE__ENGLISH assert controller.settings.get_value(SettingsConstants.SETTING__WORDLIST_LANGUAGE) == SettingsConstants.WORDLIST_LANGUAGE__ENGLISH assert controller.settings.get_value(SettingsConstants.SETTING__PERSISTENT_SETTINGS) == SettingsConstants.OPTION__DISABLED - assert controller.settings.get_value(SettingsConstants.SETTING__COORDINATORS) == [i for i,j in SettingsConstants.ALL_COORDINATORS] + assert controller.settings.get_value(SettingsConstants.SETTING__COORDINATORS) == [i for i,j in SettingsConstants.ALL_COORDINATORS if i!="kpr"] assert controller.settings.get_value(SettingsConstants.SETTING__BTC_DENOMINATION) == SettingsConstants.BTC_DENOMINATION__THRESHOLD # Advanced Settings defaults