805: Remove unused command line argument from the balance command r=rishflab a=rishflab

The target block is irrelevant when calculating the balance.

Closes #793 

Co-authored-by: rishflab <rishflab@hotmail.com>
This commit is contained in:
bors[bot] 2021-10-07 09:22:46 +00:00 committed by GitHub
commit 90bf702b99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View File

@ -53,6 +53,11 @@ It is possible to migrate critical data from the old db to the sqlite but there
- Added `export-bitcoin-wallet` subcommand to the CLI and ASB, to print the internal bitcoin wallet descriptor. - Added `export-bitcoin-wallet` subcommand to the CLI and ASB, to print the internal bitcoin wallet descriptor.
This will allow users to transact and monitor using external wallets. This will allow users to transact and monitor using external wallets.
### 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 ## [0.8.3] - 2021-09-03
### Fixed ### Fixed

View File

@ -121,7 +121,13 @@ where
data_dir: data::data_dir_from(data, is_testnet)?, data_dir: data::data_dir_from(data, is_testnet)?,
cmd: Command::Config, 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) = let (bitcoin_electrum_rpc_url, bitcoin_target_block) =
bitcoin.apply_defaults(is_testnet)?; bitcoin.apply_defaults(is_testnet)?;
@ -401,8 +407,8 @@ enum RawCommand {
}, },
#[structopt(about = "Prints the Bitcoin balance.")] #[structopt(about = "Prints the Bitcoin balance.")]
Balance { Balance {
#[structopt(flatten)] #[structopt(long = "electrum-rpc", help = "Provide the Bitcoin Electrum RPC URL")]
bitcoin: Bitcoin, bitcoin_electrum_rpc_url: Option<Url>,
}, },
/// Resume a swap /// Resume a swap
Resume { Resume {