diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py index daab12f6..d06a1c8d 100644 --- a/gui/qt/installwizard.py +++ b/gui/qt/installwizard.py @@ -349,7 +349,8 @@ class InstallWizard(QDialog): util.print_error("installwizard:", wallet, action) if action == 'create_seed': - seed = wallet.make_seed() + lang = self.config.get('language') + seed = wallet.make_seed(lang) if not self.show_seed(seed, None): return if not self.verify_seed(seed, None): diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index f7abbe8d..dececace 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -316,7 +316,6 @@ class ElectrumWindow(QMainWindow): def new_wallet(self): import installwizard - wallet_folder = os.path.dirname(os.path.abspath(self.wallet.storage.path)) i = 1 while True: @@ -325,17 +324,14 @@ class ElectrumWindow(QMainWindow): i += 1 else: break - filename = line_dialog(self, _('New Wallet'), _('Enter file name') + ':', _('OK'), filename) if not filename: return - full_path = os.path.join(wallet_folder, filename) - storage = WalletStorage({'wallet_path': full_path}) + storage = WalletStorage(full_path) if storage.file_exists: QMessageBox.critical(None, "Error", _("File exists")) return - self.hide() wizard = installwizard.InstallWizard(self.config, self.network, storage) action, wallet_type = wizard.restore_or_create() @@ -350,11 +346,9 @@ class ElectrumWindow(QMainWindow): else: self.wallet.start_threads(self.network) self.load_wallet(self.wallet) - self.show() - def init_menubar(self): menubar = QMenuBar() diff --git a/lib/wallet.py b/lib/wallet.py index 2fe0134f..cf12cf30 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -1457,9 +1457,7 @@ class BIP32_Wallet(Deterministic_Wallet): def mnemonic_to_seed(self, seed, password): return Mnemonic.mnemonic_to_seed(seed, password) - def make_seed(self): - # fixme lang = self.storage.config.get('language') - lang = None + def make_seed(self, lang=None): return Mnemonic(lang).make_seed() def format_seed(self, seed):