qml wizard: stricter validation for new wallet name
user on bitcointalk [0] tried to create wallet with name "w/o 2FA". Before this, one would only get an error after the last page of the wizard. With this, the "Next" button does not even get enabled if the name does not look ok. (and as in comment, maybe we should be even stricter re what is allowed) [0]: https://bitcointalk.org/index.php?topic=5483514.msg63584789#msg63584789
This commit is contained in:
@@ -5,7 +5,7 @@ import QtQuick.Controls
|
||||
import org.electrum 1.0
|
||||
|
||||
WizardComponent {
|
||||
valid: wallet_name.text.length > 0 && !Daemon.availableWallets.wallet_name_exists(wallet_name.text)
|
||||
valid: wiz.isValidNewWalletName(wallet_name.text)
|
||||
|
||||
function apply() {
|
||||
wizard_data['wallet_name'] = wallet_name.text
|
||||
|
||||
Reference in New Issue
Block a user