aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-11-16 01:54:29 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-05-06 21:20:00 +0200
commitbdc83e8f450456c9f547f1c4eab43571bac631c2 (patch)
tree3a05f2d4f36689a707e992bca1fca4ea018aa1d5 /src/qt/sendcoinsdialog.cpp
parentacc2d2ca5f7dadcf9807ed1bfcac6c010fe3649d (diff)
downloadbitcoin-bdc83e8f450456c9f547f1c4eab43571bac631c2.tar.xz
[Qt] ensure payment request network matches client network
- replaces checks in SendCoinsDialog::handlePaymentRequest() that belong to PaymentServer (normal URIs are special cased, as only an isValid check is done on BTC addresses) - prevents the client to handle payment requests that do not match the clients network and shows an error instead (mainly a problem with drag&drop payment requests onto the client window) - includes some small comment changes also
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 33621e54b0..23b8ef83e2 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -377,26 +377,8 @@ void SendCoinsDialog::pasteEntry(const SendCoinsRecipient &rv)
bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
{
- QString strSendCoins = tr("Send Coins");
- if (rv.paymentRequest.IsInitialized()) {
- // Expired payment request?
- const payments::PaymentDetails& details = rv.paymentRequest.getDetails();
- if (details.has_expires() && (int64_t)details.expires() < GetTime())
- {
- emit message(strSendCoins, tr("Payment request expired"),
- CClientUIInterface::MSG_WARNING);
- return false;
- }
- }
- else {
- CBitcoinAddress address(rv.address.toStdString());
- if (!address.IsValid()) {
- emit message(strSendCoins, tr("Invalid payment address %1").arg(rv.address),
- CClientUIInterface::MSG_WARNING);
- return false;
- }
- }
-
+ // Just paste the entry, all pre-checks
+ // are done in paymentserver.cpp.
pasteEntry(rv);
return true;
}