From 3a5235050b8838f23608a9674a6bf5b12a355e89 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sun, 6 Jan 2019 09:46:22 -0800 Subject: [PATCH] Add confirmations to z_listreceivedbyaddress --- src/wallet/rpcwallet.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index b6013643f..81c7abcd6 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3321,6 +3321,7 @@ UniValue z_listreceivedbyaddress(const UniValue& params, bool fHelp) " \"txid\": \"txid\", (string) the transaction id\n" " \"amount\": xxxxx, (numeric) the amount of value in the note\n" " \"memo\": xxxxx, (string) hexadecimal string representation of memo field\n" + " \"confirmations\" : n, (numeric) the number of confirmations\n" " \"jsindex\" (sprout) : n, (numeric) the joinsplit index\n" " \"jsoutindex\" (sprout) : n, (numeric) the output index of the joinsplit\n" " \"outindex\" (sapling) : n, (numeric) the output index\n" @@ -3374,6 +3375,7 @@ UniValue z_listreceivedbyaddress(const UniValue& params, bool fHelp) obj.push_back(Pair("memo", HexStr(data))); obj.push_back(Pair("jsindex", entry.jsop.js)); obj.push_back(Pair("jsoutindex", entry.jsop.n)); + obj.push_back(Pair("confirmations", entry.confirmations)); if (hasSpendingKey) { obj.push_back(Pair("change", pwalletMain->IsNoteSproutChange(nullifierSet, entry.address, entry.jsop))); } @@ -3386,6 +3388,7 @@ UniValue z_listreceivedbyaddress(const UniValue& params, bool fHelp) obj.push_back(Pair("amount", ValueFromAmount(CAmount(entry.note.value())))); obj.push_back(Pair("memo", HexStr(entry.memo))); obj.push_back(Pair("outindex", (int)entry.op.n)); + obj.push_back(Pair("confirmations", entry.confirmations)); if (hasSpendingKey) { obj.push_back(Pair("change", pwalletMain->IsNoteSaplingChange(nullifierSet, entry.address, entry.op))); }