electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 59a9e4f7107b3c9ad0b1cf501135a115320d5918
parent a1d1999545e0d9b2c741ed8411c1bcb6c52f00d1
Author: ThomasV <thomasv@gitorious>
Date:   Sun, 10 May 2015 08:31:31 +0200

fix new_wallet and seed language

Diffstat:
Mgui/qt/installwizard.py | 3++-
Mgui/qt/main_window.py | 8+-------
Mlib/wallet.py | 4+---
3 files changed, 4 insertions(+), 11 deletions(-)

diff --git 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 @@ -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 @@ -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):