mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-08 06:22:39 -04:00
fix: add data_dir to config to make config command work
This commit is contained in:
parent
250764ed30
commit
dc8982731c
3 changed files with 11 additions and 12 deletions
|
@ -26,6 +26,7 @@ pub struct Config {
|
||||||
seed: Option<Seed>,
|
seed: Option<Seed>,
|
||||||
debug: bool,
|
debug: bool,
|
||||||
json: bool,
|
json: bool,
|
||||||
|
data_dir: PathBuf,
|
||||||
pub is_testnet: bool,
|
pub is_testnet: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +110,7 @@ impl Context {
|
||||||
debug,
|
debug,
|
||||||
json,
|
json,
|
||||||
is_testnet,
|
is_testnet,
|
||||||
|
data_dir,
|
||||||
},
|
},
|
||||||
shutdown: Arc::new(shutdown),
|
shutdown: Arc::new(shutdown),
|
||||||
running_swap: Arc::new(Mutex::new(false)),
|
running_swap: Arc::new(Mutex::new(false)),
|
||||||
|
@ -238,6 +240,7 @@ pub mod api_test {
|
||||||
debug,
|
debug,
|
||||||
json,
|
json,
|
||||||
is_testnet,
|
is_testnet,
|
||||||
|
data_dir
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,6 +226,7 @@ impl Request {
|
||||||
let state: BobState = state.try_into()?;
|
let state: BobState = state.try_into()?;
|
||||||
vec.push((swap_id, state.to_string()));
|
vec.push((swap_id, state.to_string()));
|
||||||
}
|
}
|
||||||
|
|
||||||
json!({ "swaps": vec })
|
json!({ "swaps": vec })
|
||||||
}
|
}
|
||||||
Method::RawHistory => {
|
Method::RawHistory => {
|
||||||
|
@ -264,17 +265,13 @@ impl Request {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Method::Config => {
|
Method::Config => {
|
||||||
// tracing::info!(path=%data_dir.display(), "Data directory");
|
let data_dir_display = context.config.data_dir.display();
|
||||||
// tracing::info!(path=%format!("{}/logs", data_dir.display()),
|
tracing::info!(path=%data_dir_display, "Data directory");
|
||||||
// "Log files directory");
|
tracing::info!(path=%format!("{}/logs", data_dir_display), "Log files directory");
|
||||||
// tracing::info!(path=%format!("{}/sqlite", data_dir.display()), "Sqlite file
|
tracing::info!(path=%format!("{}/sqlite", data_dir_display), "Sqlite file location");
|
||||||
// location");
|
tracing::info!(path=%format!("{}/seed.pem", data_dir_display), "Seed file location");
|
||||||
// tracing::info!(path=%format!("{}/seed.pem", data_dir.display()), "Seed file
|
tracing::info!(path=%format!("{}/monero", data_dir_display), "Monero-wallet-rpc directory");
|
||||||
// location");
|
tracing::info!(path=%format!("{}/wallet", data_dir_display), "Internal bitcoin wallet directory");
|
||||||
// tracing::info!(path=%format!("{}/monero", data_dir.display()),
|
|
||||||
// "Monero-wallet-rpc directory");
|
|
||||||
// tracing::info!(path=%format!("{}/wallet", data_dir.display()), "Internal
|
|
||||||
// bitcoin wallet directory");
|
|
||||||
|
|
||||||
json!({
|
json!({
|
||||||
"result": []
|
"result": []
|
||||||
|
|
|
@ -34,7 +34,6 @@ async fn main() -> Result<()> {
|
||||||
eprintln!("{}", e);
|
eprintln!("{}", e);
|
||||||
}
|
}
|
||||||
let result = request.call(Arc::clone(&context)).await?;
|
let result = request.call(Arc::clone(&context)).await?;
|
||||||
println!("{}", result);
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue