mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
STAmount::setJson to allow amounts to be set in place.
This commit is contained in:
@@ -1223,9 +1223,9 @@ void STAmount::roundSelf()
|
||||
}
|
||||
}
|
||||
|
||||
Json::Value STAmount::getJson(int) const
|
||||
void STAmount::setJson(Json::Value& elem) const
|
||||
{
|
||||
Json::Value elem(Json::objectValue);
|
||||
elem = Json::objectValue;
|
||||
|
||||
if (!mIsNative)
|
||||
{
|
||||
@@ -1237,9 +1237,14 @@ Json::Value STAmount::getJson(int) const
|
||||
}
|
||||
else
|
||||
{
|
||||
elem=getText();
|
||||
elem = getText();
|
||||
}
|
||||
}
|
||||
|
||||
Json::Value STAmount::getJson(int) const
|
||||
{
|
||||
Json::Value elem;
|
||||
setJson(elem);
|
||||
return elem;
|
||||
}
|
||||
|
||||
|
||||
@@ -473,6 +473,7 @@ public:
|
||||
static bool issuerFromString(uint160& uDstIssuer, const std::string& sIssuer);
|
||||
|
||||
Json::Value getJson(int) const;
|
||||
void setJson(Json::Value&) const;
|
||||
|
||||
STAmount getRound() const;
|
||||
void roundSelf();
|
||||
|
||||
Reference in New Issue
Block a user