From f5e81bb0eecee1dfb9b702382c28c3cefd26dc34 Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Wed, 31 Mar 2021 16:40:40 +1100 Subject: [PATCH] Move seed and env_config outside Start command --- swap/src/bin/asb.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/swap/src/bin/asb.rs b/swap/src/bin/asb.rs index 28b1e671..5aeaa10b 100644 --- a/swap/src/bin/asb.rs +++ b/swap/src/bin/asb.rs @@ -68,13 +68,13 @@ async fn main() -> Result<()> { let db = Database::open(config.data.dir.join(db_path).as_path()) .context("Could not open database")?; + let seed = + Seed::from_file_or_generate(&config.data.dir).expect("Could not retrieve/initialize seed"); + + let env_config = env::Testnet::get_config(); + match opt.cmd { Command::Start { max_buy } => { - let seed = Seed::from_file_or_generate(&config.data.dir) - .expect("Could not retrieve/initialize seed"); - - let env_config = env::Testnet::get_config(); - let bitcoin_wallet = init_bitcoin_wallet(&config, &seed, env_config).await?; let monero_wallet = init_monero_wallet(&config, env_config).await?;