mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
cli: use GetWalletBalances() functionality for -getinfo
and replace GetBoolArg with IsArgSet as we only want to know if the arg is passed; we do not need the value.
This commit is contained in:
parent
9f01849a49
commit
afce85eb99
1 changed files with 4 additions and 2 deletions
|
|
@ -532,9 +532,8 @@ static int CommandLineRPC(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
std::unique_ptr<BaseRequestHandler> rh;
|
std::unique_ptr<BaseRequestHandler> rh;
|
||||||
std::string method;
|
std::string method;
|
||||||
if (gArgs.GetBoolArg("-getinfo", false)) {
|
if (gArgs.IsArgSet("-getinfo")) {
|
||||||
rh.reset(new GetinfoRequestHandler());
|
rh.reset(new GetinfoRequestHandler());
|
||||||
method = "";
|
|
||||||
} else {
|
} else {
|
||||||
rh.reset(new DefaultRequestHandler());
|
rh.reset(new DefaultRequestHandler());
|
||||||
if (args.size() < 1) {
|
if (args.size() < 1) {
|
||||||
|
|
@ -567,6 +566,9 @@ static int CommandLineRPC(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (gArgs.IsArgSet("-getinfo") && !gArgs.IsArgSet("-rpcwallet")) {
|
||||||
|
GetWalletBalances(result); // fetch multiwallet balances and append to result
|
||||||
|
}
|
||||||
// Result
|
// Result
|
||||||
if (result.isNull()) {
|
if (result.isNull()) {
|
||||||
strPrint = "";
|
strPrint = "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue