def load_wallet(self, path, get_wizard=None): if path in self.wallets: wallet = self.wallets[path] else: storage = WalletStorage(path) if get_wizard: if storage.file_exists: wallet = Wallet(storage) action = wallet.get_action() else: action = 'new' if action: wizard = get_wizard() wallet = wizard.run(self.network, storage) else: wallet.start_threads(self.network) else: wallet = Wallet(storage) # automatically generate wallet for lbrynet if not storage.file_exists: seed = wallet.make_seed() wallet.add_seed(seed, None) wallet.create_master_keys(None) wallet.create_main_account() wallet.synchronize() wallet.start_threads(self.network) if wallet: self.wallets[path] = wallet return wallet
def __init__(self, config, network, path): super(BaseWizard, self).__init__() self.config = config self.network = network self.storage = WalletStorage(path) self.wallet = None self.stack = [] self.plugin = None
def __init__(self, config, path): super(BaseWizard, self).__init__() self.config = config self.storage = WalletStorage(path) self.wallet = None self.stack = [] self.plugin = None self.keystores = [] self.is_kivy = config.get('gui') == 'kivy'
def load_wallet(self, config): path = config.get_wallet_path() if path in self.wallets: wallet = self.wallets[path] else: storage = WalletStorage(path) wallet = Wallet(storage) wallet.start_threads(self.network) self.wallets[path] = wallet return wallet
def load_wallet(self, path): # wizard will be launched if we return if path in self.wallets: wallet = self.wallets[path] return wallet storage = WalletStorage(path) if not storage.file_exists: return if storage.requires_split() or storage.requires_upgrade() or storage.get_action(): return wallet = Wallet(storage) wallet.start_threads(self.network) self.wallets[path] = wallet return wallet
def load_wallet(self, path): if path in self.wallets: wallet = self.wallets[path] return wallet storage = WalletStorage(path) if not storage.file_exists: return wallet = Wallet(storage) action = wallet.get_action() if action: return wallet.start_threads(self.network) self.wallets[path] = wallet return wallet
def load_wallet(self, path): # wizard will be launched if we return if path in self.wallets: wallet = self.wallets[path] return wallet storage = WalletStorage(path) if not storage.file_exists: return if storage.requires_upgrade() and 'ANDROID_DATA' in os.environ: self.print_error('upgrading wallet format') storage.upgrade() if storage.requires_split() or storage.requires_upgrade( ) or storage.get_action(): return wallet = Wallet(storage) wallet.start_threads(self.network) self.wallets[path] = wallet return wallet
def load_wallet(self, path, get_wizard=None): if path in self.wallets: wallet = self.wallets[path] else: storage = WalletStorage(path) if storage.file_exists: wallet = Wallet(storage) action = wallet.get_action() else: action = 'new' if action: if get_wizard is None: return None wizard = get_wizard() wallet = wizard.run(self.network, storage) else: wallet.start_threads(self.network) if wallet: self.wallets[path] = wallet return wallet