aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-10-24 16:02:39 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-10-31 17:51:12 +0100
commitc6c97e0f4e3d9d8d5b8a1e60174e9ff11e70b6c1 (patch)
tree54c77e769e2c7e6a5d4a0e7a027dce9c3747a2c0 /src/qt/sendcoinsdialog.cpp
parentede3ee3348ecaeed04dec587171e732ebc0830fd (diff)
downloadbitcoin-c6c97e0f4e3d9d8d5b8a1e60174e9ff11e70b6c1.tar.xz
[Qt] Rework of payment request UI (mainly for insecure pr)
- this shows insecure (unsecured) payment requests in a new yellowish colored UI (based on the secure payment request UI) instead of our normal payment UI - allows us to receive paymentACK messages for insecure payment requests - allows us to handle expirations for insecure payment request - changed walletmodel, so that all types of payment requests don't touch the addressbook
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 51304bc05c..56079bb35f 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -102,7 +102,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
{
@@ -114,10 +114,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);
}
@@ -313,7 +317,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())