| 1881 | } |
| 1882 | |
| 1883 | static void AcentryToJSON(const CAccountingEntry& acentry, const std::string& strAccount, UniValue& ret) |
| 1884 | { |
| 1885 | bool fAllAccounts = (strAccount == std::string("*")); |
| 1886 | |
| 1887 | if (fAllAccounts || acentry.strAccount == strAccount) |
| 1888 | { |
| 1889 | UniValue entry(UniValue::VOBJ); |
| 1890 | entry.pushKV("account", acentry.strAccount); |
| 1891 | entry.pushKV("category", "move"); |
| 1892 | entry.pushKV("time", acentry.nTime); |
| 1893 | entry.pushKV("amount", ValueFromAmount(acentry.nCreditDebit)); |
| 1894 | if (IsDeprecatedRPCEnabled("accounts")) entry.pushKV("otheraccount", acentry.strOtherAccount); |
| 1895 | entry.pushKV("comment", acentry.strComment); |
| 1896 | ret.push_back(entry); |
| 1897 | } |
| 1898 | } |
| 1899 | |
| 1900 | UniValue listtransactions(const JSONRPCRequest& request) |
| 1901 | { |
no test coverage detected