diff --git a/cli/src/cli.rs b/cli/src/cli.rs index d6f247346c..3cdf6c6eac 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -337,7 +337,15 @@ pub async fn new_wallet(cli: Cli) -> Result, Error> { Some(wallet) } else { // init new wallet with default init parameters - let init_params = InitParameters::default(); + let mut init_params = InitParameters::default(); + + if let Ok(stronghold_snapshot_path) = std::env::var("STRONGHOLD_SNAPSHOT_PATH") { + init_params.stronghold_snapshot_path = stronghold_snapshot_path; + } + if let Ok(node_url) = std::env::var("NODE_URL") { + init_params.node_url = node_url; + } + let snapshot_path = Path::new(&init_params.stronghold_snapshot_path); if !snapshot_path.exists() { if get_decision("Create a new wallet with default parameters?")? {