diff --git a/src/Amount.cpp b/src/Amount.cpp index 1e2db3124c..e6616a9c35 100644 --- a/src/Amount.cpp +++ b/src/Amount.cpp @@ -880,6 +880,30 @@ STAmount STAmount::deserialize(SerializerIterator& it) } std::string STAmount::getFullText() const +{ + if (mIsNative) + { + return str(boost::format("%s/" SYSTEM_CURRENCY_CODE) % getText()); + } + else if (!mIssuer) + { + return str(boost::format("%s/%s/0") % getText() % getHumanCurrency()); + } + else if (mIssuer == ACCOUNT_ONE) + { + return str(boost::format("%s/%s/1") % getText() % getHumanCurrency()); + } + else + { + return str(boost::format("%s/%s/%s") + % getText() + % getHumanCurrency() + % NewcoinAddress::createHumanAccountID(mIssuer)); + } +} + +#if 0 +std::string STAmount::getExtendedText() const { if (mIsNative) { @@ -887,7 +911,7 @@ std::string STAmount::getFullText() const } else { - return str(boost::format("%s %s/%s %dE%d" ) + return str(boost::format("%s/%s/%s %dE%d" ) % getText() % getHumanCurrency() % NewcoinAddress::createHumanAccountID(mIssuer) @@ -895,6 +919,7 @@ std::string STAmount::getFullText() const % getExponent()); } } +#endif Json::Value STAmount::getJson(int) const {