Browse Source

fix cmd line wallet creation. fixes #684

283
ThomasV 11 years ago
parent
commit
a18d21d946
  1. 8
      electrum
  2. 2
      lib/wallet.py

8
electrum

@ -250,12 +250,10 @@ if __name__ == '__main__':
else: else:
import getpass import getpass
seed = getpass.getpass(prompt="seed:", stream=None) if options.concealed else raw_input("seed:") seed = getpass.getpass(prompt="seed:", stream=None) if options.concealed else raw_input("seed:")
if not seed: if not Wallet.is_seed(seed):
sys.exit("Error: Seed cannot be empty")
wallet = Wallet.from_seed(str(seed),storage)
if not wallet:
sys.exit("Error: Invalid seed") sys.exit("Error: Invalid seed")
wallet.save_seed(password) wallet = Wallet.from_seed(seed, storage)
wallet.add_seed(seed, password)
wallet.create_accounts(password) wallet.create_accounts(password)
if not options.offline: if not options.offline:

2
lib/wallet.py

@ -1546,7 +1546,7 @@ class OldWallet(Deterministic_Wallet):
def create_master_keys(self, password): def create_master_keys(self, password):
seed = pw_decode(self.seed, password) seed = self.get_seed(password)
mpk = OldAccount.mpk_from_seed(seed) mpk = OldAccount.mpk_from_seed(seed)
self.storage.put('master_public_key', mpk, True) self.storage.put('master_public_key', mpk, True)

Loading…
Cancel
Save