seed v6
This commit is contained in:
@@ -717,7 +717,7 @@ def show_seed():
|
||||
password = None
|
||||
|
||||
try:
|
||||
seed = wallet.decode_seed(password)
|
||||
seed = wallet.get_seed(password)
|
||||
except:
|
||||
modal_dialog('error','incorrect password')
|
||||
return
|
||||
@@ -733,7 +733,7 @@ def change_password_dialog():
|
||||
password = None
|
||||
|
||||
try:
|
||||
seed = wallet.decode_seed(password)
|
||||
wallet.get_seed(password)
|
||||
except:
|
||||
modal_dialog('error','incorrect password')
|
||||
return
|
||||
@@ -748,7 +748,7 @@ def change_password_dialog():
|
||||
modal_dialog('error','passwords do not match')
|
||||
return
|
||||
|
||||
wallet.update_password(seed, password, new_password)
|
||||
wallet.update_password(password, new_password)
|
||||
if new_password:
|
||||
modal_dialog('Password updated','your wallet is encrypted')
|
||||
else:
|
||||
|
||||
@@ -69,7 +69,7 @@ def show_seed_dialog(wallet, password, parent):
|
||||
show_message("No seed")
|
||||
return
|
||||
try:
|
||||
seed = wallet.decode_seed(password)
|
||||
seed = wallet.get_seed(password)
|
||||
except:
|
||||
show_message("Incorrect password")
|
||||
return
|
||||
@@ -435,7 +435,7 @@ def change_password_dialog(wallet, parent, icon):
|
||||
return
|
||||
|
||||
try:
|
||||
seed = wallet.decode_seed(password)
|
||||
wallet.get_seed(password)
|
||||
except:
|
||||
show_message("Incorrect password")
|
||||
return
|
||||
@@ -444,7 +444,7 @@ def change_password_dialog(wallet, parent, icon):
|
||||
show_message("passwords do not match")
|
||||
return
|
||||
|
||||
wallet.update_password(seed, password, new_password)
|
||||
wallet.update_password(password, new_password)
|
||||
|
||||
if icon:
|
||||
if wallet.use_encryption:
|
||||
|
||||
@@ -89,10 +89,9 @@ class InstallWizard(QDialog):
|
||||
vbox = QVBoxLayout(self)
|
||||
if is_restore:
|
||||
msg = _("Please enter your wallet seed.") + "\n"
|
||||
msg += _("Your seed can be entered as a sequence of words, or as a hexadecimal string.")+ ' \n'
|
||||
else:
|
||||
msg = _("Your seed is important!") \
|
||||
+ "\n" + _("To make sure that you have properly saved your seed, please retype it here.") + ' '
|
||||
+ "\n" + _("To make sure that you have properly saved your seed, please retype it here.")
|
||||
|
||||
logo = QLabel()
|
||||
logo.setPixmap(QPixmap(":icons/seed.png").scaledToWidth(56))
|
||||
@@ -119,15 +118,7 @@ class InstallWizard(QDialog):
|
||||
if not self.exec_():
|
||||
return
|
||||
|
||||
try:
|
||||
seed = str(seed_e.toPlainText())
|
||||
seed.decode('hex')
|
||||
except:
|
||||
try:
|
||||
seed = mnemonic.mn_decode( seed.split() )
|
||||
except:
|
||||
QMessageBox.warning(None, _('Error'), _('I cannot decode this'), _('OK'))
|
||||
return
|
||||
seed = unicode(seed_e.toPlainText())
|
||||
|
||||
if not seed:
|
||||
QMessageBox.warning(None, _('Error'), _('No seed'), _('OK'))
|
||||
@@ -288,7 +279,12 @@ class InstallWizard(QDialog):
|
||||
seed = self.seed_dialog()
|
||||
if not seed:
|
||||
return
|
||||
wallet.init_seed(str(seed))
|
||||
try:
|
||||
wallet.init_seed(seed)
|
||||
except:
|
||||
QMessageBox.warning(None, _('Error'), _('Incorrect seed'), _('OK'))
|
||||
return
|
||||
|
||||
wallet.save_seed()
|
||||
|
||||
elif action == 'watching':
|
||||
|
||||
@@ -1544,12 +1544,12 @@ class ElectrumWindow(QMainWindow):
|
||||
|
||||
if self.wallet.seed:
|
||||
try:
|
||||
seed = self.wallet.decode_seed(password)
|
||||
mnemonic = self.wallet.get_mnemonic(password)
|
||||
except:
|
||||
QMessageBox.warning(self, _('Error'), _('Incorrect Password'), _('OK'))
|
||||
return
|
||||
from seed_dialog import SeedDialog
|
||||
d = SeedDialog(self, seed, self.wallet.imported_keys)
|
||||
d = SeedDialog(self, mnemonic, self.wallet.imported_keys)
|
||||
d.exec_()
|
||||
else:
|
||||
l = {}
|
||||
|
||||
@@ -84,7 +84,7 @@ def run_password_dialog(self, wallet, parent):
|
||||
new_password2 = unicode(self.conf_pw.text())
|
||||
|
||||
try:
|
||||
seed = wallet.decode_seed(password)
|
||||
wallet.get_seed(password)
|
||||
except:
|
||||
QMessageBox.warning(parent, _('Error'), _('Incorrect Password'), _('OK'))
|
||||
return
|
||||
@@ -96,7 +96,7 @@ def run_password_dialog(self, wallet, parent):
|
||||
return
|
||||
|
||||
try:
|
||||
wallet.update_password(seed, password, new_password)
|
||||
wallet.update_password(password, new_password)
|
||||
except:
|
||||
QMessageBox.warning(parent, _('Error'), _('Failed to update password'), _('OK'))
|
||||
return
|
||||
|
||||
@@ -57,12 +57,11 @@ class PrivateKeysDialog(QDialog):
|
||||
|
||||
def make_seed_dialog(seed, imported_keys):
|
||||
|
||||
words = mnemonic.mn_encode(seed)
|
||||
brainwallet = ' '.join(words)
|
||||
words = seed.split()
|
||||
|
||||
label1 = QLabel(_("Your wallet generation seed is")+ ":")
|
||||
|
||||
seed_text = QTextEdit(brainwallet)
|
||||
seed_text = QTextEdit(seed)
|
||||
seed_text.setReadOnly(True)
|
||||
seed_text.setMaximumHeight(130)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user