Skip to content

Commit

Permalink
Merge pull request #276 from nomic-io/set-sig-key-fix
Browse files Browse the repository at this point in the history
Create signer path if not already present
  • Loading branch information
mappum authored Feb 12, 2024
2 parents 85580bb + a2aad45 commit fff18a0
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 fff18a0

Please sign in to comment.