From 442b7a1a52c2edf5346f4f9f731d68555b60d53d Mon Sep 17 00:00:00 2001 From: okaybro <66475772+Chaitanya-Keyal@users.noreply.github.com> Date: Wed, 22 Jul 2026 09:05:41 +0530 Subject: [PATCH] fix: replace removed `get_seed` call in `PSBTSelectSeedView` Co-authored-by: Nick Klockenga <127377+newtonick@users.noreply.github.com> --- src/seedsigner/views/psbt_views.py | 2 +- tests/test_flows_psbt.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/seedsigner/views/psbt_views.py b/src/seedsigner/views/psbt_views.py index 475aef49..9e0fbeb1 100644 --- a/src/seedsigner/views/psbt_views.py +++ b/src/seedsigner/views/psbt_views.py @@ -58,7 +58,7 @@ class PSBTSelectSeedView(View): if len(seeds) > 0 and selected_menu_num < len(seeds): # User selected one of the n seeds - self.controller.psbt_seed = self.controller.get_seed(selected_menu_num) + self.controller.psbt_seed = seeds[selected_menu_num] return Destination(PSBTOverviewView) # The remaining flows are a sub-flow; resume PSBT flow once the seed is loaded. diff --git a/tests/test_flows_psbt.py b/tests/test_flows_psbt.py index 4141e575..1e3067de 100644 --- a/tests/test_flows_psbt.py +++ b/tests/test_flows_psbt.py @@ -57,6 +57,18 @@ class TestPSBTFlows(FlowTest): FlowStep(MainMenuView) ]) + # Run the same PSBT flow again, this time selecting the seed that the + # previous flow left loaded in memory. + self.run_sequence([ + FlowStep(MainMenuView, button_data_selection=MainMenuView.SCAN), + FlowStep(scan_views.ScanView, before_run=load_psbt_into_decoder), + FlowStep(psbt_views.PSBTSelectSeedView, screen_return_value=0), + FlowStep(psbt_views.PSBTOverviewView), + ]) + + # Selecting the existing seed should have set it as the signing seed + assert self.controller.psbt_seed is self.controller.storage.seeds[0] + def test_scan_psbt_first_then_load_electrum_seed(self): """