use wallet db ds flag in rpc

This commit is contained in:
UdjinM6 2015-02-08 17:10:44 +03:00
parent 3a64318bd2
commit c1d946bc0a

View File

@ -1116,7 +1116,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
Object entry; Object entry;
entry.push_back(Pair("account", strSentAccount)); entry.push_back(Pair("account", strSentAccount));
MaybePushAddress(entry, s.first); MaybePushAddress(entry, s.first);
entry.push_back(Pair("category", wtx.IsDenominated() ? "darksent" : "send")); std::map<std::string, std::string>::const_iterator it = wtx.mapValue.find("DS");
entry.push_back(Pair("category", (it != wtx.mapValue.end() && it->second == "1") ? "darksent" : "send"));
entry.push_back(Pair("amount", ValueFromAmount(-s.second))); entry.push_back(Pair("amount", ValueFromAmount(-s.second)));
entry.push_back(Pair("fee", ValueFromAmount(-nFee))); entry.push_back(Pair("fee", ValueFromAmount(-nFee)));
if (fLong) if (fLong)