Rename config_path to path to avoid duplication

This commit is contained in:
Daniel Karzel 2021-01-29 14:29:30 +11:00
parent 2adfd89ffd
commit 79a0f53745
2 changed files with 5 additions and 5 deletions

View File

@ -86,7 +86,7 @@ pub struct Config {
help = "Provide a custom path to the configuration file. The configuration file must be a toml file.",
parse(from_os_str)
)]
pub config_path: Option<PathBuf>,
pub path: Option<PathBuf>,
}
fn parse_btc(str: &str) -> anyhow::Result<bitcoin::Amount> {

View File

@ -77,7 +77,7 @@ async fn main() -> Result<()> {
receive_bitcoin,
config,
} => {
let settings = init_settings(config.config_path)?;
let settings = init_settings(config.path)?;
let swap_amounts = SwapAmounts {
xmr: send_monero,
@ -116,7 +116,7 @@ async fn main() -> Result<()> {
receive_monero,
config,
} => {
let settings = init_settings(config.config_path)?;
let settings = init_settings(config.path)?;
let swap_amounts = SwapAmounts {
btc: send_bitcoin,
@ -166,7 +166,7 @@ async fn main() -> Result<()> {
listen_addr,
config,
}) => {
let settings = init_settings(config.config_path)?;
let settings = init_settings(config.path)?;
let (bitcoin_wallet, monero_wallet) = init_wallets(settings.wallets).await?;
@ -191,7 +191,7 @@ async fn main() -> Result<()> {
alice_addr,
config,
}) => {
let settings = init_settings(config.config_path)?;
let settings = init_settings(config.path)?;
let (bitcoin_wallet, monero_wallet) = init_wallets(settings.wallets).await?;