diff options
author | Ben Carman <benthecarman@live.com> | 2019-02-09 12:33:26 -0600 |
---|---|---|
committer | Ben Carman <benthecarman@live.com> | 2019-02-09 12:33:26 -0600 |
commit | 3407b446cc5ec0725c0505e3b933f43d86286ad5 (patch) | |
tree | fb375aa39896da61bacfa9cb755ce2bd51287231 /src/qt | |
parent | d5dbb45bdf7d62257cf73c452f7d43727e3ae72b (diff) | |
download | bitcoin-3407b446cc5ec0725c0505e3b933f43d86286ad5.tar.xz |
gui: Uppercase bech32 addresses in qr codes
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/guiutil.cpp | 4 |
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) |