gui: Uppercase bech32 addresses in qr codes

This commit is contained in:
Ben Carman 2019-02-09 12:33:26 -06:00
parent d5dbb45bdf
commit 3407b446cc
No known key found for this signature in database
GPG key ID: D7CC770B81FD22A8

View file

@ -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)