diff options
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/guiutil.cpp | 6 | ||||
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 558eff6d5d..d2d7716dbd 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -4,7 +4,6 @@ #include "bitcoinunits.h" #include "util.h" #include "init.h" -#include "base58.h" #include <QString> #include <QDateTime> @@ -81,11 +80,6 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) if(uri.scheme() != QString("bitcoin")) return false; - // check if the address is valid - CBitcoinAddress addressFromUri(uri.path().toStdString()); - if (!addressFromUri.IsValid()) - return false; - SendCoinsRecipient rv; rv.address = uri.path(); rv.amount = 0; diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 2c46ea5a70..789681ad90 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -7,6 +7,7 @@ #include "sendcoinsentry.h" #include "guiutil.h" #include "askpassphrasedialog.h" +#include "base58.h" #include <QMessageBox> #include <QLocale> @@ -273,6 +274,9 @@ bool SendCoinsDialog::handleURI(const QString &uri) // URI has to be valid if (GUIUtil::parseBitcoinURI(uri, &rv)) { + CBitcoinAddress address(rv.address.toStdString()); + if (!address.IsValid()) + return false; pasteEntry(rv); return true; } |