Return names from STUInt16::getJson for transaction and ledger entry types.

This commit is contained in:
JoelKatz
2012-10-06 14:14:30 -07:00
parent 95d1127dad
commit 53f97a45ce

View File

@@ -99,6 +99,18 @@ std::string STUInt16::getText() const
Json::Value STUInt16::getJson(int) const
{
if (getFName() == sfLedgerEntryType)
{
LedgerEntryFormat *f = LedgerEntryFormat::getLgrFormat(value);
if (f != NULL)
return f->t_name;
}
if (getFName() == sfTransactionType)
{
TransactionFormat *f = TransactionFormat::getTxnFormat(value);
if (f != NULL)
return f->t_name;
}
return value;
}