aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/coins.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/rpc/coins.cpp')
-rw-r--r--src/wallet/rpc/coins.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/wallet/rpc/coins.cpp b/src/wallet/rpc/coins.cpp
index 0cb0891141..b6c7396f4b 100644
--- a/src/wallet/rpc/coins.cpp
+++ b/src/wallet/rpc/coins.cpp
@@ -194,15 +194,12 @@ RPCHelpMan getbalance()
LOCK(pwallet->cs_wallet);
- const auto dummy_value{self.MaybeArg<std::string>(0)};
+ const auto dummy_value{self.MaybeArg<std::string>("dummy")};
if (dummy_value && *dummy_value != "*") {
throw JSONRPCError(RPC_METHOD_DEPRECATED, "dummy first argument must be excluded or set to \"*\".");
}
- int min_depth = 0;
- if (!request.params[1].isNull()) {
- min_depth = request.params[1].getInt<int>();
- }
+ const auto min_depth{self.Arg<int>("minconf")};
bool include_watchonly = ParseIncludeWatchonly(request.params[2], *pwallet);