Remove jss::account_index and jss::peer_index.

This commit is contained in:
Tom Ritchford
2015-06-26 18:11:32 -04:00
committed by Vinnie Falco
parent 1e7588d0ab
commit ea67a2d051
12 changed files with 33 additions and 130 deletions

View File

@@ -63,24 +63,12 @@ Json::Value doGatewayBalances (RPC::Context& context)
? params[jss::account].asString ()
: params[jss::ident].asString ());
int iIndex = 0;
if (params.isMember (jss::account_index))
{
auto const& accountIndex = params[jss::account_index];
if (!accountIndex.isUInt() && !accountIndex.isInt ())
return RPC::invalid_field_message (jss::account_index);
iIndex = accountIndex.asUInt ();
}
bool const bStrict = params.isMember (jss::strict) &&
params[jss::strict].asBool ();
// Get info on account.
bool bIndex; // out param
AccountID accountID;
Json::Value jvAccepted = RPC::accountFromString (
accountID, bIndex, strIdent, iIndex, bStrict);
auto jvAccepted = RPC::accountFromString (accountID, strIdent, bStrict);
if (jvAccepted)
return jvAccepted;