Skip to content

Commit

Permalink
Merge branch '2.0' into feat/slot-predictions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaughterOfMars committed Mar 12, 2024
2 parents 1fa7136 + 9ec4481 commit f317781
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 f317781

Please sign in to comment.