Skip to content

Commit

Permalink
Merge branch 'chore/todo-cleanup' of https://github.com/iotaledger/io…
Browse files Browse the repository at this point in the history
…ta-sdk into chore/todo-cleanup
  • Loading branch information
Alex Coats committed Mar 12, 2024
2 parents 7b5ebc2 + 5000ff9 commit 0aac4aa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,15 @@ pub async fn new_wallet(cli: Cli) -> Result<Option<Wallet>, 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?")? {
Expand Down

0 comments on commit 0aac4aa

Please sign in to comment.