Skip to content

Commit

Permalink
Create signer path if not already present
Browse files Browse the repository at this point in the history
  • Loading branch information
cwlittle committed Feb 8, 2024
1 parent 85580bb commit a2aad45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ pub fn load_or_generate(path: PathBuf, network: bitcoin::Network) -> Result<Exte
load_bitcoin_key(path)
} else {
let key = generate_bitcoin_key(network)?;
fs::create_dir_all(path.parent().unwrap())?;
fs::write(path.clone(), key.to_string())?;
info!("Generated bitcoin key at {}", path.display());
warn!("This is your signer key. Back it up!");
Expand Down

0 comments on commit a2aad45

Please sign in to comment.