Skip to content

Commit

Permalink
gui: Uppercase bech32 addresses in qr codes
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Feb 9, 2019
1 parent d5dbb45 commit 3407b44
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3407b44

Please sign in to comment.