mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Return the destination amount in PFRequest updates. Return the ID.
This commit is contained in:
@@ -191,6 +191,9 @@ int PFRequest::parseJson(const Json::Value& jvParams, bool complete)
|
||||
}
|
||||
}
|
||||
|
||||
if (jvParams.isMember("id"))
|
||||
jvId = jvParams["id"];
|
||||
|
||||
return ret;
|
||||
}
|
||||
Json::Value PFRequest::doClose(const Json::Value&)
|
||||
@@ -234,6 +237,10 @@ bool PFRequest::doUpdate(RLCache::ref cache, bool fast)
|
||||
|
||||
jvStatus["source_account"] = raSrcAccount.humanAccountID();
|
||||
jvStatus["destination_account"] = raDstAccount.humanAccountID();
|
||||
jvStatus["destination_amount"] = saDstAmount.getJson(0);
|
||||
|
||||
if (!jvId.isNull())
|
||||
jvStatus["id"] = jvId;
|
||||
|
||||
Json::Value jvArray = Json::arrayValue;
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ public:
|
||||
protected:
|
||||
boost::recursive_mutex mLock;
|
||||
boost::weak_ptr<InfoSub> wpSubscriber; // Who this request came from
|
||||
Json::Value jvId;
|
||||
Json::Value jvStatus; // Last result
|
||||
|
||||
// Client request parameters
|
||||
|
||||
Reference in New Issue
Block a user