|
|
@ -93,8 +93,9 @@ class Wallet: |
|
|
|
self.tx_height = config.get('tx_height',{}) |
|
|
|
self.accounts = config.get('accounts', {}) # this should not include public keys |
|
|
|
|
|
|
|
self.SequenceClass = ElectrumSequence |
|
|
|
self.sequences = {} |
|
|
|
self.sequences[0] = ElectrumSequence(self.config.get('master_public_key')) |
|
|
|
self.sequences[0] = self.SequenceClass(self.config.get('master_public_key')) |
|
|
|
|
|
|
|
if self.accounts.get(0) is None: |
|
|
|
self.accounts[0] = { 0:[], 1:[], 'name':'Main account' } |
|
|
@ -161,13 +162,13 @@ 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) |
|
|
|
mpk = self.SequenceClass.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.sequences[0] = self.SequenceClass(mpk) |
|
|
|
self.accounts[0] = { 0:[], 1:[], 'name':'Main account' } |
|
|
|
self.config.set_key('accounts', self.accounts, True) |
|
|
|
|
|
|
|