mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-29 10:54:36 +01:00
Configurable cache dir (#567)
* Add a configurable cache dir * Fix UDL field position
This commit is contained in:
@@ -16,6 +16,9 @@ pub(crate) struct Args {
|
||||
#[clap(short, long)]
|
||||
pub(crate) data_dir: Option<String>,
|
||||
|
||||
#[clap(short, long)]
|
||||
pub(crate) cache_dir: Option<String>,
|
||||
|
||||
#[clap(short, long)]
|
||||
pub(crate) log_file: Option<String>,
|
||||
|
||||
@@ -75,6 +78,7 @@ async fn main() -> Result<()> {
|
||||
.map(|var| var.into_string().expect("Expected valid API key string"));
|
||||
let mut config = LiquidSdk::default_config(network, breez_api_key)?;
|
||||
config.working_dir = data_dir_str;
|
||||
config.cache_dir = args.cache_dir;
|
||||
let sdk = LiquidSdk::connect(ConnectRequest {
|
||||
mnemonic: mnemonic.to_string(),
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user