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