Return the "destination_currencies" field.

This commit is contained in:
JoelKatz
2013-04-09 20:48:53 -07:00
parent c93cd6e011
commit 568c27ef86
3 changed files with 38 additions and 1 deletions

View File

@@ -1234,6 +1234,15 @@ Json::Value RPCHandler::doRipplePathFind(Json::Value jvRequest, int& cost)
ScopedUnlock su(theApp->getMasterLock()); // As long as we have a locked copy of the ledger, we can unlock.
// Fill in currencies destination will accept
Json::Value jvDestCur(Json::arrayValue);
boost::unordered_set<uint160> usDestCurrID = usAccountDestCurrencies(raDst, lpLedger, true);
BOOST_FOREACH(const uint160& uCurrency, usDestCurrID)
jvDestCur.append(STAmount::createHumanCurrency(uCurrency));
jvResult["destination_currencies"] = jvDestCur;
Json::Value jvArray(Json::arrayValue);
for (unsigned int i=0; i != jvSrcCurrencies.size(); ++i) {