mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-05 23:24:25 +01:00
fix: automatic directory creation on wallet startup (#47)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use std::{
|
||||
fs,
|
||||
sync::{Arc, Mutex},
|
||||
thread,
|
||||
time::Duration,
|
||||
@@ -79,8 +80,10 @@ impl Wallet {
|
||||
ElementsNetwork::ElementsRegtest { .. } => todo!(),
|
||||
});
|
||||
|
||||
let swap_persister =
|
||||
Persister::new(opts.db_root_path.unwrap_or(DEFAULT_SWAPS_DIR.to_string()));
|
||||
let persister_path = opts.db_root_path.unwrap_or(DEFAULT_SWAPS_DIR.to_string());
|
||||
fs::create_dir_all(&persister_path)?;
|
||||
|
||||
let swap_persister = Persister::new(persister_path);
|
||||
swap_persister.init()?;
|
||||
|
||||
let wallet = Arc::new(Wallet {
|
||||
|
||||
Reference in New Issue
Block a user