From df7e1cba148598a0b5584ef5c6890e4c7dacb50f Mon Sep 17 00:00:00 2001 From: 3rd Iteration Date: Sat, 17 Feb 2024 11:28:54 -0500 Subject: [PATCH 1/5] Fix Always Wiping Multisig Descriptor at Main Menu --- src/seedsigner/controller.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/seedsigner/controller.py b/src/seedsigner/controller.py index 206ad2c0a..18cdfb72c 100644 --- a/src/seedsigner/controller.py +++ b/src/seedsigner/controller.py @@ -298,7 +298,6 @@ def run(self): # Home always wipes the back_stack/state of temp vars self.resume_main_flow = None - self.multisig_wallet_descriptor = None self.unverified_address = None self.address_explorer_data = None self.psbt = None From fca41a27063c46d02901073821aad94290c48e69 Mon Sep 17 00:00:00 2001 From: CryptoGuide Date: Sun, 18 Feb 2024 13:44:27 -0500 Subject: [PATCH 2/5] Change text & add warning when signing a Multisig transaction without a descriptor loaded. --- src/seedsigner/views/psbt_views.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/seedsigner/views/psbt_views.py b/src/seedsigner/views/psbt_views.py index 9c0d9c60f..7d99a8af1 100644 --- a/src/seedsigner/views/psbt_views.py +++ b/src/seedsigner/views/psbt_views.py @@ -285,6 +285,7 @@ def run(self): class PSBTChangeDetailsView(View): NEXT = "Next" + SKIP_VERIFICATION = "Skip Verificiation" VERIFY_MULTISIG = "Verify Multisig Change" @@ -330,9 +331,11 @@ def run(self): if is_change_derivation_path: title = "Your Change" self.VERIFY_MULTISIG = "Verify Multisig Change" + unverified_warning_text = "Can't Verify that Change Outputs Belong to your Wallet" else: title = "Self-Transfer" self.VERIFY_MULTISIG = "Verify Multisig Addr" + unverified_warning_text = "Can't Verify that Self-Transfer Outputs Belong to your Wallet" # if psbt_parser.num_change_outputs > 1: # title += f" (#{self.change_address_num + 1})" @@ -345,7 +348,7 @@ def run(self): else: # Have the Screen offer to load in the multisig descriptor. - button_data = [self.VERIFY_MULTISIG, self.NEXT] + button_data = [self.VERIFY_MULTISIG, self.SKIP_VERIFICATION] else: # Single sig @@ -413,7 +416,19 @@ def run(self): if selected_menu_num == RET_CODE__BACK_BUTTON: return Destination(BackStackView) - elif button_data[selected_menu_num] == self.NEXT: + elif button_data[selected_menu_num] == self.NEXT or button_data[selected_menu_num] == self.SKIP_VERIFICATION: + if button_data[selected_menu_num] == self.SKIP_VERIFICATION: + self.run_screen( + DireWarningScreen, + title="Security Warning", + status_icon_name=SeedSignerIconConstants.WARNING, + status_headline="Potential Loss of Funds", + text=unverified_warning_text, + ) + + if selected_menu_num == RET_CODE__BACK_BUTTON: + return Destination(BackStackView) + if self.change_address_num < psbt_parser.num_change_outputs - 1: return Destination(PSBTChangeDetailsView, view_args={"change_address_num": self.change_address_num + 1}) else: From b29f1114c03e379aa4d23db4b94853951d418385 Mon Sep 17 00:00:00 2001 From: CryptoGuide Date: Sun, 18 Feb 2024 13:53:13 -0500 Subject: [PATCH 3/5] Fix menu navigation --- src/seedsigner/views/psbt_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/seedsigner/views/psbt_views.py b/src/seedsigner/views/psbt_views.py index 7d99a8af1..d6a751868 100644 --- a/src/seedsigner/views/psbt_views.py +++ b/src/seedsigner/views/psbt_views.py @@ -418,7 +418,7 @@ def run(self): elif button_data[selected_menu_num] == self.NEXT or button_data[selected_menu_num] == self.SKIP_VERIFICATION: if button_data[selected_menu_num] == self.SKIP_VERIFICATION: - self.run_screen( + selected_menu_num = self.run_screen( DireWarningScreen, title="Security Warning", status_icon_name=SeedSignerIconConstants.WARNING, From 66d68047fb55bfecf6ea90dd757740f6c7074e93 Mon Sep 17 00:00:00 2001 From: CryptoGuide Date: Sun, 18 Feb 2024 14:28:22 -0500 Subject: [PATCH 4/5] Fix up CI tests to handle new warning screen --- tests/test_flows_psbt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_flows_psbt.py b/tests/test_flows_psbt.py index 02b714463..c5e0f72a1 100644 --- a/tests/test_flows_psbt.py +++ b/tests/test_flows_psbt.py @@ -73,7 +73,8 @@ def load_seed_into_decoder(view: scan_views.ScanView): FlowStep(psbt_views.PSBTOverviewView), FlowStep(psbt_views.PSBTMathView), FlowStep(psbt_views.PSBTAddressDetailsView, button_data_selection=0), - FlowStep(psbt_views.PSBTChangeDetailsView, button_data_selection=psbt_views.PSBTChangeDetailsView.NEXT), + FlowStep(psbt_views.PSBTChangeDetailsView, button_data_selection=psbt_views.PSBTChangeDetailsView.SKIP_VERIFICATION), + FlowStep(psbt_views.PSBTChangeDetailsView, button_data_selection=0), FlowStep(psbt_views.PSBTFinalizeView, button_data_selection=psbt_views.PSBTFinalizeView.APPROVE_PSBT), FlowStep(psbt_views.PSBTSigningErrorView, button_data_selection=psbt_views.PSBTSigningErrorView.SELECT_DIFF_SEED), FlowStep(psbt_views.PSBTSelectSeedView, button_data_selection=psbt_views.PSBTSelectSeedView.SCAN_SEED), @@ -85,7 +86,8 @@ def load_seed_into_decoder(view: scan_views.ScanView): FlowStep(psbt_views.PSBTOverviewView), FlowStep(psbt_views.PSBTMathView), FlowStep(psbt_views.PSBTAddressDetailsView, button_data_selection=0), - FlowStep(psbt_views.PSBTChangeDetailsView, button_data_selection=psbt_views.PSBTChangeDetailsView.NEXT), + FlowStep(psbt_views.PSBTChangeDetailsView, button_data_selection=psbt_views.PSBTChangeDetailsView.SKIP_VERIFICATION), + FlowStep(psbt_views.PSBTChangeDetailsView, button_data_selection=0), FlowStep(psbt_views.PSBTFinalizeView, button_data_selection=psbt_views.PSBTFinalizeView.APPROVE_PSBT), FlowStep(psbt_views.PSBTSignedQRDisplayView), FlowStep(MainMenuView), From 2e3c74e015d7598e84897a7c8992029cc667dca1 Mon Sep 17 00:00:00 2001 From: 3rd Iteration Date: Tue, 20 Feb 2024 22:44:18 -0500 Subject: [PATCH 5/5] Revert "Fix Always Wiping Multisig Descriptor at Main Menu" This reverts commit df7e1cba148598a0b5584ef5c6890e4c7dacb50f. --- src/seedsigner/controller.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/seedsigner/controller.py b/src/seedsigner/controller.py index 18cdfb72c..206ad2c0a 100644 --- a/src/seedsigner/controller.py +++ b/src/seedsigner/controller.py @@ -298,6 +298,7 @@ def run(self): # Home always wipes the back_stack/state of temp vars self.resume_main_flow = None + self.multisig_wallet_descriptor = None self.unverified_address = None self.address_explorer_data = None self.psbt = None