aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-05-09 09:25:50 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-05-09 18:47:14 +0200
commitfa422aeec2909df0151177816dc1ff5eb5a1fbab (patch)
treeced2beb06c5cd34b742925d0e7d9b7ae0a68cbcf /src/qt
parentfa548ac872c094edc94c2afda5cc9b0d84f73af0 (diff)
scripted-diff: Use UniValue::find_value method
-BEGIN VERIFY SCRIPT- sed --regexp-extended -i 's/find_value\(([^ ,]+), /\1.find_value(/g' $(git grep -l find_value) -END VERIFY SCRIPT-
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/rpcconsole.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 972bc36ad2..bac64e3d5f 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -249,7 +249,7 @@ bool RPCConsole::RPCParseCommandLine(interfaces::Node* node, std::string &strRes
subelement = lastResult[parsed.value()];
}
else if (lastResult.isObject())
- subelement = find_value(lastResult, curarg);
+ subelement = lastResult.find_value(curarg);
else
throw std::runtime_error("Invalid result query"); //no array or object: abort
lastResult = subelement;
@@ -448,8 +448,8 @@ void RPCExecutor::request(const QString &command, const WalletModel* wallet_mode
{
try // Nice formatting for standard-format error
{
- int code = find_value(objError, "code").getInt<int>();
- std::string message = find_value(objError, "message").get_str();
+ int code = objError.find_value("code").getInt<int>();
+ std::string message = objError.find_value("message").get_str();
Q_EMIT reply(RPCConsole::CMD_ERROR, QString::fromStdString(message) + " (code " + QString::number(code) + ")");
}
catch (const std::runtime_error&) // raised when converting to invalid type, i.e. missing code or message