[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
This commit is contained in:
Jonas Schnelli 2017-09-22 20:48:14 -06:00 committed by Pieter Wuille
parent 06eaca6313
commit 8213838db2

View File

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