Add CashAddr Address Format
Ported from Bitcoin Unlimited, Bitcoin ABC
This commit is contained in:
@@ -10,9 +10,10 @@
|
||||
|
||||
#include <QUrl>
|
||||
|
||||
OpenURIDialog::OpenURIDialog(QWidget *parent) :
|
||||
OpenURIDialog::OpenURIDialog(const Config *cfg, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::OpenURIDialog)
|
||||
ui(new Ui::OpenURIDialog),
|
||||
cfg(cfg)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
#if QT_VERSION >= 0x040700
|
||||
@@ -33,7 +34,8 @@ QString OpenURIDialog::getURI()
|
||||
void OpenURIDialog::accept()
|
||||
{
|
||||
SendCoinsRecipient rcp;
|
||||
if(GUIUtil::parseBitcoinURI(getURI(), &rcp))
|
||||
QString uriScheme = GUIUtil::bitcoinURIScheme(*cfg);
|
||||
if (GUIUtil::parseBitcoinURI(uriScheme, getURI(), &rcp))
|
||||
{
|
||||
/* Only accept value URIs */
|
||||
QDialog::accept();
|
||||
@@ -48,5 +50,5 @@ void OpenURIDialog::on_selectFileButton_clicked()
|
||||
if(filename.isEmpty())
|
||||
return;
|
||||
QUrl fileUri = QUrl::fromLocalFile(filename);
|
||||
ui->uriEdit->setText("blackcoin:?r=" + QUrl::toPercentEncoding(fileUri.toString()));
|
||||
ui->uriEdit->setText(GUIUtil::bitcoinURIScheme(*cfg) + ":?r=" + QUrl::toPercentEncoding(fileUri.toString()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user