From 214730743f865d06336f9fea5399538ad4b4fb2f Mon Sep 17 00:00:00 2001 From: rishflab Date: Thu, 7 Oct 2021 11:16:57 +1100 Subject: [PATCH] Remove unused command line argument from the balance command The target block is irrelevant when calculating the balance. --- CHANGELOG.md | 5 +++++ swap/src/cli/command.rs | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a266e81..bc00bdb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,11 @@ It is possible to migrate critical data from the old db to the sqlite but there - A `config` subcommand that prints the current configuration including the data directory location. This feature should alleviate difficulties users were having when finding where xmr-btc-swap was storing data. +### Removed + +- The `bitcoin-target-block` argument from the `balance` subcommand on the CLI. + This argument did not affect how the balance was calculated and was pointless. + ## [0.8.3] - 2021-09-03 ### Fixed diff --git a/swap/src/cli/command.rs b/swap/src/cli/command.rs index b7d68e78..e7f87813 100644 --- a/swap/src/cli/command.rs +++ b/swap/src/cli/command.rs @@ -121,7 +121,13 @@ where data_dir: data::data_dir_from(data, is_testnet)?, cmd: Command::Config, }, - RawCommand::Balance { bitcoin } => { + RawCommand::Balance { + bitcoin_electrum_rpc_url, + } => { + let bitcoin = Bitcoin { + bitcoin_electrum_rpc_url, + bitcoin_target_block: None, + }; let (bitcoin_electrum_rpc_url, bitcoin_target_block) = bitcoin.apply_defaults(is_testnet)?; @@ -381,8 +387,8 @@ enum RawCommand { }, #[structopt(about = "Prints the Bitcoin balance.")] Balance { - #[structopt(flatten)] - bitcoin: Bitcoin, + #[structopt(long = "electrum-rpc", help = "Provide the Bitcoin Electrum RPC URL")] + bitcoin_electrum_rpc_url: Option, }, /// Resume a swap Resume {