Skip to content

Commit

Permalink
Merge pull request #185 from PRCYCoin/paymentid-display-changes
Browse files Browse the repository at this point in the history
[Wallet] Only display PaymentID if the transaction IsMine
  • Loading branch information
lopeed committed Jan 13, 2022
2 parents 4d80fdf + 4331ad9 commit 9803de1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rpc/rawtransaction.cpp
Expand Up @@ -69,7 +69,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
entry.push_back(Pair("version", tx.nVersion));
entry.push_back(Pair("locktime", (int64_t)tx.nLockTime));
entry.push_back(Pair("txfee", ValueFromAmount(tx.nTxFee)));
if (tx.hasPaymentID) {
if (tx.hasPaymentID && pwalletMain->IsMine(tx)) {
entry.push_back(Pair("paymentid", tx.paymentID));
}
entry.push_back(Pair("txType", (int64_t)tx.txType));
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/rpcwallet.cpp
Expand Up @@ -71,7 +71,7 @@ void WalletTxToJSON(const CWalletTx& wtx, UniValue& entry)
entry.push_back(Pair("time", wtx.GetTxTime()));
entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived));

if (wtx.hasPaymentID) {
if (wtx.hasPaymentID && pwalletMain->IsMine(wtx)) {
entry.push_back(Pair("paymentid", wtx.paymentID));
}

Expand Down

0 comments on commit 9803de1

Please sign in to comment.