aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2019-04-29 09:04:20 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2019-04-29 09:04:40 +0200
commit3a0d6da098c77703f30bb6bbd58c1d42390c469f (patch)
tree13623360edfb96a9b4047d0e39ba25e3271ef545 /src/qt
parentbdd7217f2c03007ce1df85cd9a750d1893d88cdc (diff)
parent3407b446cc5ec0725c0505e3b933f43d86286ad5 (diff)
Merge #15371: gui: Uppercase bech32 addresses in qr codes
3407b446c gui: Uppercase bech32 addresses in qr codes (Ben Carman) Pull request description: Closes #12191 ACKs for commit 3407b4: meshcollider: utACK https://github.com/bitcoin/bitcoin/pull/15371/commits/3407b446cc5ec0725c0505e3b933f43d86286ad5 jonasschnelli: Re utACK 3407b446cc5ec0725c0505e3b933f43d86286ad5 Tree-SHA512: d63ecf8e9805c46c9f554cc929661a37837bc3ba9b7b931331c2a5c2b81468742e1819c9add73966083011709cc15ae1870a454348af8591b3d75d3765dca568
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 6e76555979..45f21d50fc 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)