fix create_new_account
This commit is contained in:
parent
1ff2f1b308
commit
e6208e2747
|
@ -1429,13 +1429,22 @@ class ElectrumWindow(QMainWindow):
|
|||
else:
|
||||
QMessageBox.warning(self, _('Error'), _('Invalid Address'), _('OK'))
|
||||
|
||||
|
||||
def new_account_dialog(self):
|
||||
text, ok = QInputDialog.getText(self, _('New Account'), _('Name') + ':')
|
||||
if not ok or not text:
|
||||
return
|
||||
name = unicode(text)
|
||||
if ok:
|
||||
self.wallet.create_new_account(name)
|
||||
try:
|
||||
self.create_new_account(name)
|
||||
except:
|
||||
QMessageBox.warning(self, _('Error'), _('Incorrect Password'), _('OK'))
|
||||
|
||||
@protected
|
||||
def create_new_account(self, name, password):
|
||||
self.wallet.create_new_account(name, password)
|
||||
self.wallet.synchronize()
|
||||
self.update_contacts_tab()
|
||||
self.update_receive_tab()
|
||||
self.update_history_tab()
|
||||
self.update_completions()
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ class Wallet:
|
|||
self.config.set_key('master_private_keys', self.master_private_keys, True)
|
||||
|
||||
# create default account
|
||||
self.create_new_account('Main account')
|
||||
self.create_new_account('Main account', None)
|
||||
|
||||
|
||||
def create_new_account(self, name, password):
|
||||
|
|
Loading…
Reference in New Issue