Merge #1268: Fix RemoteBackend::Undefined panic because of skipped step

877b95e52ddb3871f0469253d121a157f028798d Fix RemoteBackend::Undefined panic because of skipped step (edouardparis)

Pull request description:

  Because Testnet and regtest do not ask user the choice of backend the install panic as the RemoteBackend enum stays to undefined

  close #1264

ACKs for top commit:
  edouardparis:
    Self-ACK 877b95e52ddb3871f0469253d121a157f028798d

Tree-SHA512: 80b3ca99e8848bb2025174874307e6931947548c5964c7a6dd46517becb40c7a9fdd5a51385d24167541374ce8219bb6d04d96a20a8b3d8aefcef6a936346025
This commit is contained in:
edouardparis 2024-09-05 10:25:18 +02:00
commit b44fad6715
No known key found for this signature in database
GPG Key ID: E65F7A089C20DC8F

View File

@ -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,