@@ -1182,6 +1182,8 @@ UniValue ListReceived(const UniValue& params, bool fByAccounts)
1182
1182
obj.push_back (Pair (" account" , strAccount));
1183
1183
obj.push_back (Pair (" amount" , ValueFromAmount (nAmount)));
1184
1184
obj.push_back (Pair (" confirmations" , (nConf == std::numeric_limits<int >::max () ? 0 : nConf)));
1185
+ if (!fByAccounts )
1186
+ obj.push_back (Pair (" label" , strAccount));
1185
1187
UniValue transactions (UniValue::VARR);
1186
1188
if (it != mapTally.end ())
1187
1189
{
@@ -1235,7 +1237,8 @@ UniValue listreceivedbyaddress(const UniValue& params, bool fHelp)
1235
1237
" \" address\" : \" receivingaddress\" , (string) The receiving address\n "
1236
1238
" \" account\" : \" accountname\" , (string) DEPRECATED. The account of the receiving address. The default account is \"\" .\n "
1237
1239
" \" amount\" : x.xxx, (numeric) The total amount in " + CURRENCY_UNIT + " received by the address\n "
1238
- " \" confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n "
1240
+ " \" confirmations\" : n, (numeric) The number of confirmations of the most recent transaction included\n "
1241
+ " \" label\" : \" label\" (string) A comment for the address/transaction, if any\n "
1239
1242
" }\n "
1240
1243
" ,...\n "
1241
1244
" ]\n "
@@ -1271,7 +1274,8 @@ UniValue listreceivedbyaccount(const UniValue& params, bool fHelp)
1271
1274
" \" involvesWatchonly\" : true, (bool) Only returned if imported addresses were involved in transaction\n "
1272
1275
" \" account\" : \" accountname\" , (string) The account name of the receiving account\n "
1273
1276
" \" amount\" : x.xxx, (numeric) The total amount received by addresses with this account\n "
1274
- " \" confirmations\" : n (numeric) The number of confirmations of the most recent transaction included\n "
1277
+ " \" confirmations\" : n, (numeric) The number of confirmations of the most recent transaction included\n "
1278
+ " \" label\" : \" label\" (string) A comment for the address/transaction, if any\n "
1275
1279
" }\n "
1276
1280
" ,...\n "
1277
1281
" ]\n "
@@ -1318,6 +1322,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
1318
1322
MaybePushAddress (entry, s.destination );
1319
1323
entry.push_back (Pair (" category" , " send" ));
1320
1324
entry.push_back (Pair (" amount" , ValueFromAmount (-s.amount )));
1325
+ if (pwalletMain->mapAddressBook .count (s.destination ))
1326
+ entry.push_back (Pair (" label" , pwalletMain->mapAddressBook [s.destination ].name ));
1321
1327
entry.push_back (Pair (" vout" , s.vout ));
1322
1328
entry.push_back (Pair (" fee" , ValueFromAmount (-nFee)));
1323
1329
if (fLong )
@@ -1355,6 +1361,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
1355
1361
entry.push_back (Pair (" category" , " receive" ));
1356
1362
}
1357
1363
entry.push_back (Pair (" amount" , ValueFromAmount (r.amount )));
1364
+ if (pwalletMain->mapAddressBook .count (r.destination ))
1365
+ entry.push_back (Pair (" label" , account));
1358
1366
entry.push_back (Pair (" vout" , r.vout ));
1359
1367
if (fLong )
1360
1368
WalletTxToJSON (wtx, entry);
@@ -1423,6 +1431,7 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
1423
1431
" \" timereceived\" : xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available \n "
1424
1432
" for 'send' and 'receive' category of transactions.\n "
1425
1433
" \" comment\" : \" ...\" , (string) If a comment is associated with the transaction.\n "
1434
+ " \" label\" : \" label\" (string) A comment for the address/transaction, if any\n "
1426
1435
" \" otheraccount\" : \" accountname\" , (string) For the 'move' category of transactions, the account the funds came \n "
1427
1436
" from (for receiving funds, positive amounts), or went to (for sending funds,\n "
1428
1437
" negative amounts).\n "
@@ -1613,6 +1622,7 @@ UniValue listsinceblock(const UniValue& params, bool fHelp)
1613
1622
" \" time\" : xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n "
1614
1623
" \" timereceived\" : xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n "
1615
1624
" \" comment\" : \" ...\" , (string) If a comment is associated with the transaction.\n "
1625
+ " \" label\" : \" label\" (string) A comment for the address/transaction, if any\n "
1616
1626
" \" to\" : \" ...\" , (string) If a comment to is associated with the transaction.\n "
1617
1627
" ],\n "
1618
1628
" \" lastblock\" : \" lastblockhash\" (string) The hash of the last block\n "
@@ -1700,7 +1710,8 @@ UniValue gettransaction(const UniValue& params, bool fHelp)
1700
1710
" \" account\" : \" accountname\" , (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n "
1701
1711
" \" address\" : \" bitcoinaddress\" , (string) The bitcoin address involved in the transaction\n "
1702
1712
" \" category\" : \" send|receive\" , (string) The category, either 'send' or 'receive'\n "
1703
- " \" amount\" : x.xxx (numeric) The amount in " + CURRENCY_UNIT + " \n "
1713
+ " \" amount\" : x.xxx, (numeric) The amount in " + CURRENCY_UNIT + " \n "
1714
+ " \" label\" : \" label\" , (string) A comment for the address/transaction, if any\n "
1704
1715
" \" vout\" : n, (numeric) the vout value\n "
1705
1716
" }\n "
1706
1717
" ,...\n "
0 commit comments