mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-06 07:28:24 +00:00
Merge pull request #533 from 3rdIteration/fix_multisig_descriptor_wipe
Clarify Language & Add Warning for Signing Without Multisig Descriptor Loaded
This commit is contained in:
@@ -284,6 +284,7 @@ class PSBTAddressDetailsView(View):
|
||||
|
||||
class PSBTChangeDetailsView(View):
|
||||
NEXT = "Next"
|
||||
SKIP_VERIFICATION = "Skip Verificiation"
|
||||
VERIFY_MULTISIG = "Verify Multisig Change"
|
||||
|
||||
|
||||
@@ -329,9 +330,11 @@ class PSBTChangeDetailsView(View):
|
||||
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})"
|
||||
|
||||
@@ -344,7 +347,7 @@ class PSBTChangeDetailsView(View):
|
||||
|
||||
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
|
||||
@@ -412,7 +415,19 @@ class PSBTChangeDetailsView(View):
|
||||
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:
|
||||
selected_menu_num = 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:
|
||||
|
||||
@@ -72,7 +72,8 @@ class TestPSBTFlows(FlowTest):
|
||||
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),
|
||||
@@ -84,7 +85,8 @@ class TestPSBTFlows(FlowTest):
|
||||
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),
|
||||
|
||||
Reference in New Issue
Block a user