mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 18:55:49 +00:00
add native currency to various rpc repsonses (#179)
This commit is contained in:
@@ -467,6 +467,7 @@ JSS(missingCommand); // error
|
||||
JSS(name); // out: AmendmentTableImpl, PeerImp
|
||||
JSS(namespace_entries); // out: AccountNamespace
|
||||
JSS(namespace_id); // in/out: AccountNamespace
|
||||
JSS(native_currency_code); // out: RPC
|
||||
JSS(needed_state_hashes); // out: InboundLedger
|
||||
JSS(needed_transaction_hashes); // out: InboundLedger
|
||||
JSS(network_id); // out: NetworkOPs
|
||||
|
||||
@@ -367,6 +367,7 @@ private:
|
||||
ret[jss::TRANSACTION_TYPES][type_name] = type_value;
|
||||
}
|
||||
|
||||
ret[jss::native_currency_code] = systemCurrencyCode();
|
||||
// generate hash
|
||||
{
|
||||
const std::string out = Json::FastWriter().write(ret);
|
||||
@@ -415,6 +416,7 @@ doServerDefinitions(RPC::JsonContext& context)
|
||||
{
|
||||
Json::Value jv = Json::objectValue;
|
||||
jv[jss::hash] = to_string(hash);
|
||||
jv[jss::native_currency_code] = systemCurrencyCode();
|
||||
return jv;
|
||||
}
|
||||
|
||||
@@ -440,6 +442,9 @@ doServerInfo(RPC::JsonContext& context)
|
||||
ret[jss::info][jss::validation_quorum] = vq.isNull() ? 1 : vq;
|
||||
ret[jss::info][jss::load_factor] = lf.isNull() ? 1 : lf;
|
||||
}
|
||||
|
||||
ret[jss::native_currency_code] = systemCurrencyCode();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ doServerState(RPC::JsonContext& context)
|
||||
context.params.isMember(jss::counters) &&
|
||||
context.params[jss::counters].asBool());
|
||||
|
||||
ret[jss::native_currency_code] = systemCurrencyCode();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user