aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiondesc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/transactiondesc.cpp')
-rw-r--r--src/qt/transactiondesc.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index e9f3eb478d..25ff3623c0 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -7,6 +7,7 @@
#include "db.h"
#include "ui_interface.h"
#include "base58.h"
+#include "paymentserver.h"
#include <string>
@@ -216,6 +217,21 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + wtx.GetHash().ToString().c_str() + "<br>";
+ //
+ // PaymentRequest info:
+ //
+ foreach (const PAIRTYPE(string, string)& r, wtx.vOrderForm)
+ {
+ if (r.first == "PaymentRequest")
+ {
+ PaymentRequestPlus req;
+ req.parse(QByteArray::fromRawData(r.second.c_str(), r.second.size()));
+ QString merchant;
+ if (req.getMerchant(PaymentServer::getCertStore(), merchant))
+ strHTML += "<b>" + tr("Merchant") + ":</b> " + GUIUtil::HtmlEscape(merchant) + "<br>";
+ }
+ }
+
if (wtx.IsCoinBase())
strHTML += "<br>" + tr("Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>";