Skip to content

Commit a637734

Browse files
committed
rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str
1 parent 02d9f50 commit a637734

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,8 @@ UniValue getbalance(const JSONRPCRequest& request)
729729
if (request.params.size() == 0)
730730
return ValueFromAmount(pwallet->GetBalance());
731731

732-
const std::string* account = request.params[0].get_str() != "*" ? &request.params[0].get_str() : nullptr;
732+
const std::string& account_param = request.params[0].get_str();
733+
const std::string* account = account_param != "*" ? &account_param : nullptr;
733734

734735
int nMinDepth = 1;
735736
if (request.params.size() > 1)

0 commit comments

Comments
 (0)