From 53f97a45ce96d0e2a191ce2cf5ebab841aa46d37 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sat, 6 Oct 2012 14:14:30 -0700 Subject: [PATCH] Return names from STUInt16::getJson for transaction and ledger entry types. --- src/SerializedTypes.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/SerializedTypes.cpp b/src/SerializedTypes.cpp index 82cf3b88ad..3f9f5c9b65 100644 --- a/src/SerializedTypes.cpp +++ b/src/SerializedTypes.cpp @@ -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; }