diff --git a/electrum b/electrum index 3a318dc80..53de47fcb 100755 --- a/electrum +++ b/electrum @@ -148,7 +148,7 @@ if __name__ == '__main__': wallet.gap_limit = gap if len(seed) == 128: wallet.seed = '' - wallet.sequence.master_public_key = seed + wallet.init_sequence(str(seed)) else: wallet.init_seed(str(seed)) diff --git a/gui/gui_classic.py b/gui/gui_classic.py index 47cb09845..b74005adc 100644 --- a/gui/gui_classic.py +++ b/gui/gui_classic.py @@ -2315,7 +2315,8 @@ class ElectrumGui: def password_dialog(self): - ElectrumWindow.change_password_dialog(self.wallet) + if self.wallet.seed: + ElectrumWindow.change_password_dialog(self.wallet) def restore_wallet(self): diff --git a/lib/wallet.py b/lib/wallet.py index 52ca49b20..5341f194a 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -161,16 +161,17 @@ class Wallet: self.seed = seed self.config.set_key('seed', self.seed, True) self.config.set_key('seed_version', self.seed_version, True) - mpk = ElectrumSequence.mpk_from_seed(self.seed) + self.init_sequence(mpk) + + + def init_sequence(self, mpk): self.config.set_key('master_public_key', mpk, True) self.sequences[0] = ElectrumSequence(mpk) - self.accounts[0] = { 0:[], 1:[], 'name':'Main account' } self.config.set_key('accounts', self.accounts, True) - def addresses(self, include_change = False): o = self.imported_keys.keys() for a in self.accounts.values():