1
0

Threaded wallet creation

This commit is contained in:
Neil Booth
2016-01-17 22:03:57 +09:00
parent 6e346e52cc
commit c2efb09734
3 changed files with 33 additions and 18 deletions

View File

@@ -237,8 +237,13 @@ def qt_plugin_class(base_plugin_class):
def on_create_wallet(self, wallet, wizard):
assert type(wallet) == self.wallet_class
wallet.handler = self.create_handler(wizard)
wallet.thread = TaskThread(wizard, wizard.on_error)
self.select_device(wallet)
wallet.create_hd_account(None)
# Create accounts in separate thread; wait until done
loop = QEventLoop()
wallet.thread.add(partial(wallet.create_hd_account, None),
on_done=loop.quit)
loop.exec_()
@hook
def receive_menu(self, menu, addrs, wallet):