Browse Source

[Qt] tolerate BIP173/bech32 addresses during input validation

This eases the during-type validation to allow Bech32 chars.
Once the focus has been lost, the address will be properly verified through IsValidDestinationString
0.16
Jonas Schnelli 7 years ago committed by Pieter Wuille
parent
commit
8213838db2
  1. 2
      src/qt/bitcoinaddressvalidator.cpp

2
src/qt/bitcoinaddressvalidator.cpp

@ -67,7 +67,7 @@ QValidator::State BitcoinAddressEntryValidator::validate(QString &input, int &po
if (((ch >= '0' && ch<='9') || if (((ch >= '0' && ch<='9') ||
(ch >= 'a' && ch<='z') || (ch >= 'a' && ch<='z') ||
(ch >= 'A' && ch<='Z')) && (ch >= 'A' && ch<='Z')) &&
ch != 'l' && ch != 'I' && ch != '0' && ch != 'O') ch != 'I' && ch != 'O') // Characters invalid in both Base58 and Bech32
{ {
// Alphanumeric and not a 'forbidden' character // Alphanumeric and not a 'forbidden' character
} }

Loading…
Cancel
Save