aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-11-06 16:39:04 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-11-06 16:43:18 +0100
commit65d0fc4b73104e9f9d2960b1019c1d2365d0458e (patch)
treeec955a6dbb95424f769ea9cc15b9b411d8bdc320 /src/qt/sendcoinsdialog.cpp
parent04f5286096fde1bb85b2dfd72ffc9521ef784080 (diff)
parent395d0d5af017bbf6d432471075608efaf4104a03 (diff)
Merge pull request #3145
395d0d5 rework an ugly hack in processPaymentRequest() (Philip Kaufmann) 952d2cd make processPaymentRequest() use a single SendCoinsRecipient (Philip Kaufmann) 983cef4 payment-request UI: use SendCoinsRecipient.message for memo (Philip Kaufmann) c6c97e0 [Qt] Rework of payment request UI (mainly for insecure pr) (Philip Kaufmann)
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index ec2712d8f2..2490c64835 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -106,7 +106,7 @@ void SendCoinsDialog::on_sendButton_clicked()
QString recipientElement;
- if (rcp.authenticatedMerchant.isEmpty())
+ if (!rcp.paymentRequest.IsInitialized()) // normal payment
{
if(rcp.label.length() > 0) // label with address
{
@@ -118,10 +118,14 @@ void SendCoinsDialog::on_sendButton_clicked()
recipientElement = tr("%1 to %2").arg(amount, address);
}
}
- else // just merchant
+ else if(!rcp.authenticatedMerchant.isEmpty()) // secure payment request
{
recipientElement = tr("%1 to %2").arg(amount, GUIUtil::HtmlEscape(rcp.authenticatedMerchant));
}
+ else // insecure payment request
+ {
+ recipientElement = tr("%1 to %2").arg(amount, address);
+ }
formatted.append(recipientElement);
}
@@ -317,7 +321,7 @@ void SendCoinsDialog::pasteEntry(const SendCoinsRecipient &rv)
bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
{
QString strSendCoins = tr("Send Coins");
- if (!rv.authenticatedMerchant.isEmpty()) {
+ if (rv.paymentRequest.IsInitialized()) {
// Expired payment request?
const payments::PaymentDetails& details = rv.paymentRequest.getDetails();
if (details.has_expires() && (int64)details.expires() < GetTime())