qml: wizard to check if wallet name is already used
was erroring at the very last moment previously
This commit is contained in:
@@ -5,7 +5,7 @@ import QtQuick.Controls 2.1
|
||||
import org.electrum 1.0
|
||||
|
||||
WizardComponent {
|
||||
valid: wallet_name.text.length > 0
|
||||
valid: wallet_name.text.length > 0 && !Daemon.availableWallets.wallet_name_exists(wallet_name.text)
|
||||
|
||||
function apply() {
|
||||
wizard_data['wallet_name'] = wallet_name.text
|
||||
|
||||
@@ -91,6 +91,7 @@ class QEWalletListModel(QAbstractListModel):
|
||||
self.wallets = wallets
|
||||
self.endRemoveRows()
|
||||
|
||||
@pyqtSlot(str, result=bool)
|
||||
def wallet_name_exists(self, name):
|
||||
for wallet_name, wallet_path in self.wallets:
|
||||
if name == wallet_name:
|
||||
|
||||
Reference in New Issue
Block a user