From 877b95e52ddb3871f0469253d121a157f028798d Mon Sep 17 00:00:00 2001 From: edouardparis Date: Thu, 5 Sep 2024 09:56:28 +0200 Subject: [PATCH] Fix RemoteBackend::Undefined panic because of skipped step Because Testnet and regtest do not ask user the choice of backend the install panic as the RemoteBackend enum stays to undefined close #1264 --- gui/src/installer/mod.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gui/src/installer/mod.rs b/gui/src/installer/mod.rs index 15a96e50..f9cdb339 100644 --- a/gui/src/installer/mod.rs +++ b/gui/src/installer/mod.rs @@ -102,9 +102,14 @@ impl Installer { let context = Context::new( network, destination_path.clone(), - remote_backend - .map(RemoteBackend::WithoutWallet) - .unwrap_or(RemoteBackend::Undefined), + remote_backend.map(RemoteBackend::WithoutWallet).unwrap_or( + if matches!(network, Network::Bitcoin | Network::Signet) { + RemoteBackend::Undefined + } else { + // The step for choosing the backend will be skipped. + RemoteBackend::None + }, + ), ); let mut installer = Installer { network,