Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactiondesc.cpp
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifdef HAVE_CONFIG_H | |||||
#include <config/bitcoin-config.h> | |||||
#endif | |||||
#include <qt/transactiondesc.h> | #include <qt/transactiondesc.h> | ||||
#include <cashaddrenc.h> | #include <cashaddrenc.h> | ||||
#include <chain.h> | #include <chain.h> | ||||
#include <consensus/consensus.h> | #include <consensus/consensus.h> | ||||
#include <interfaces/node.h> | #include <interfaces/node.h> | ||||
#include <key_io.h> | #include <key_io.h> | ||||
#include <policy/policy.h> | #include <policy/policy.h> | ||||
▲ Show 20 Lines • Show All 293 Lines • ▼ Show 20 Lines | QString TransactionDesc::toHTML(interfaces::Node &node, | ||||
// Message from normal bitcoincash:URI (bitcoincash:123...?message=example) | // Message from normal bitcoincash:URI (bitcoincash:123...?message=example) | ||||
for (const std::pair<std::string, std::string> &r : orderForm) { | for (const std::pair<std::string, std::string> &r : orderForm) { | ||||
if (r.first == "Message") { | if (r.first == "Message") { | ||||
strHTML += "<br><b>" + tr("Message") + ":</b><br>" + | strHTML += "<br><b>" + tr("Message") + ":</b><br>" + | ||||
GUIUtil::HtmlEscape(r.second, true) + "<br>"; | GUIUtil::HtmlEscape(r.second, true) + "<br>"; | ||||
} | } | ||||
} | } | ||||
#ifdef ENABLE_BIP70 | |||||
// | // | ||||
// PaymentRequest info: | // PaymentRequest info: | ||||
// | // | ||||
for (const std::pair<std::string, std::string> &r : orderForm) { | for (const std::pair<std::string, std::string> &r : orderForm) { | ||||
if (r.first == "PaymentRequest") { | if (r.first == "PaymentRequest") { | ||||
PaymentRequestPlus req; | PaymentRequestPlus req; | ||||
req.parse( | req.parse( | ||||
QByteArray::fromRawData(r.second.data(), r.second.size())); | QByteArray::fromRawData(r.second.data(), r.second.size())); | ||||
QString merchant; | QString merchant; | ||||
if (req.getMerchant(PaymentServer::getCertStore(), merchant)) { | if (req.getMerchant(PaymentServer::getCertStore(), merchant)) { | ||||
strHTML += "<b>" + tr("Merchant") + ":</b> " + | strHTML += "<b>" + tr("Merchant") + ":</b> " + | ||||
GUIUtil::HtmlEscape(merchant) + "<br>"; | GUIUtil::HtmlEscape(merchant) + "<br>"; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
#endif | |||||
if (wtx.is_coinbase) { | if (wtx.is_coinbase) { | ||||
quint32 numBlocksToMaturity = COINBASE_MATURITY + 1; | quint32 numBlocksToMaturity = COINBASE_MATURITY + 1; | ||||
strHTML += | strHTML += | ||||
"<br>" + | "<br>" + | ||||
tr("Generated coins must mature %1 blocks before they can be " | tr("Generated coins must mature %1 blocks before they can be " | ||||
"spent. When you generated this block, it was broadcast to the " | "spent. When you generated this block, it was broadcast to the " | ||||
"network to be added to the block chain. If it fails to get " | "network to be added to the block chain. If it fails to get " | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |