fix new_wallet and seed language

This commit is contained in:
ThomasV 2015-05-10 08:31:31 +02:00
parent a1d1999545
commit 59a9e4f710
3 changed files with 4 additions and 11 deletions

View File

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

View File

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

View File

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