mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 10:35:50 +00:00
Cleanup some Json::Value methods:
* Rename isArray to isArrayOrNull * Rename isObject to isObjectOrNull * Introduce isArray and isObject * Change as many uses of isArrayorNull to isArray as possible * Change as many uses of isObjectorNull to isObject as possible * Reject null JSON arrays for subscribe and unsubscribe
This commit is contained in:
committed by
Mike Ellery
parent
20defb4844
commit
1a245234f1
@@ -116,7 +116,8 @@ Json::Value doGatewayBalances (RPC::Context& context)
|
||||
Json::Value const& hw = params[jss::hotwallet];
|
||||
bool valid = true;
|
||||
|
||||
if (hw.isArray())
|
||||
// null is treated as a valid 0-sized array of hotwallet
|
||||
if (hw.isArrayOrNull())
|
||||
{
|
||||
for (unsigned i = 0; i < hw.size(); ++i)
|
||||
valid &= addHotWallet (hw[i]);
|
||||
|
||||
Reference in New Issue
Block a user