|
|
@ -441,8 +441,11 @@ bool Settings::isValidTransparentPrivateKey(QString pk) { |
|
|
|
|
|
|
|
// TODO: can a taddr privkey start with anything else?
|
|
|
|
if (pk.startsWith("U") || pk.startsWith("5") || pk.startsWith("L") || pk.startsWith("K") || pk.startsWith("7")) { |
|
|
|
// TODO: verify only contains base58 characters
|
|
|
|
return true; |
|
|
|
// verify only contains base58 characters
|
|
|
|
QRegExp exp("^[U5LK7][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{51,52}$", Qt::CaseSensitive); |
|
|
|
bool valid = exp.exactMatch(pk); |
|
|
|
if(!valid) { DEBUG("privkey invalid, not base58"); } |
|
|
|
return valid; |
|
|
|
} else { |
|
|
|
DEBUG("privkey invalid, wrong prefix"); |
|
|
|
return false; |
|
|
|