From ed4c7fd4fdc1f5b89162d9e91ad57d16205b06eb Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 5 Sep 2013 12:23:08 +0200 Subject: qt: add vout index to transaction id in transactions details dialog --- src/qt/transactiondesc.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/qt/transactiondesc.cpp') diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index 55875c2e46..e27aa93a4a 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -8,6 +8,7 @@ #include "ui_interface.h" #include "base58.h" #include "paymentserver.h" +#include "transactionrecord.h" #include @@ -32,7 +33,7 @@ QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx) } } -QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int unit) +QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int unit) { QString strHTML; @@ -215,7 +216,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int unit) if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty()) strHTML += "
" + tr("Comment") + ":
" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "
"; - strHTML += "" + tr("Transaction ID") + ": " + wtx.GetHash().ToString().c_str() + "
"; + strHTML += "" + tr("Transaction ID") + ": " + TransactionRecord::formatSubTxId(wtx.GetHash(), vout) + "
"; // // PaymentRequest info: @@ -225,7 +226,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int unit) if (r.first == "PaymentRequest") { PaymentRequestPlus req; - req.parse(QByteArray::fromRawData(r.second.c_str(), r.second.size())); + req.parse(QByteArray::fromRawData(r.second.data(), r.second.size())); QString merchant; if (req.getMerchant(PaymentServer::getCertStore(), merchant)) strHTML += "" + tr("Merchant") + ": " + GUIUtil::HtmlEscape(merchant) + "
"; -- cgit v1.2.3