aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorBen Carman <benthecarman@live.com>2019-02-09 12:33:26 -0600
committerBen Carman <benthecarman@live.com>2019-02-09 12:33:26 -0600
commit3407b446cc5ec0725c0505e3b933f43d86286ad5 (patch)
treefb375aa39896da61bacfa9cb755ce2bd51287231 /src/qt
parentd5dbb45bdf7d62257cf73c452f7d43727e3ae72b (diff)
gui: Uppercase bech32 addresses in qr codes
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/guiutil.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index ba0a5abdf3..6048b06dca 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -175,7 +175,9 @@ bool parseBitcoinURI(QString uri, SendCoinsRecipient *out)
QString formatBitcoinURI(const SendCoinsRecipient &info)
{
- QString ret = QString("bitcoin:%1").arg(info.address);
+ bool bech_32 = info.address.startsWith(QString::fromStdString(Params().Bech32HRP() + "1"));
+
+ QString ret = QString("bitcoin:%1").arg(bech_32 ? info.address.toUpper() : info.address);
int paramCount = 0;
if (info.amount)