From 45a2e02ae15b032c4b0873b451d6df0f41e38cd4 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 14 Nov 2022 11:45:59 -0800 Subject: [PATCH] Remove redundant check --- src/options.rs | 4 +++- src/subcommand/wallet/send.rs | 10 ---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/options.rs b/src/options.rs index a6f92c548b..236cc23b6a 100644 --- a/src/options.rs +++ b/src/options.rs @@ -124,7 +124,9 @@ impl Options { let total = balances.mine.trusted + balances.mine.untrusted_pending + balances.mine.immature; if total > Amount::from_sat(1_000_000) { - bail!("`ord wallet send` may not be used on mainnet with wallets containing more than 1,000,000 sats"); + bail!( + "`{command}` may not be used on mainnet with wallets containing more than 1,000,000 sats" + ); } } Ok(client) diff --git a/src/subcommand/wallet/send.rs b/src/subcommand/wallet/send.rs index 6a1004e007..3f9550d276 100644 --- a/src/subcommand/wallet/send.rs +++ b/src/subcommand/wallet/send.rs @@ -23,16 +23,6 @@ impl Send { let utxos = list_unspent(&options, &index)?.into_iter().collect(); - if options.chain == Chain::Mainnet { - let balances = client.get_balances()?; - - if balances.mine.trusted + balances.mine.untrusted_pending + balances.mine.immature - > Amount::from_sat(1_000_000) - { - bail!("`ord wallet send` may not be used on mainnet with wallets containing more than 1,000,000 sats"); - } - } - let change = get_change_addresses(&options, 2)?; let unsigned_transaction =