Browse Source

qml: wizard to check if wallet name is already used

was erroring at the very last moment previously
master
SomberNight 3 years ago
parent
commit
87909485c5
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/gui/qml/components/wizard/WCWalletName.qml
  2. 1
      electrum/gui/qml/qedaemon.py

2
electrum/gui/qml/components/wizard/WCWalletName.qml

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

1
electrum/gui/qml/qedaemon.py

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

Loading…
Cancel
Save