qt wizard bip39 recovery: better handle --offline mode
```
32.40 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
File "/home/user/wspace/electrum/electrum/gui/qt/wizard/wallet.py", line 709, in <lambda>
button.clicked.connect(lambda: Bip39RecoveryDialog(self, get_account_xpub, on_account_select))
File "/home/user/wspace/electrum/electrum/gui/qt/bip39_recovery_dialog.py", line 40, in __init__
fut = asyncio.run_coroutine_threadsafe(coro, network.asyncio_loop)
AttributeError: 'NoneType' object has no attribute 'asyncio_loop'
```
This commit is contained in:
@@ -407,6 +407,9 @@ class Network(Logger, NetworkRetryManager[ServerAddr]):
|
||||
|
||||
@staticmethod
|
||||
def get_instance() -> Optional["Network"]:
|
||||
"""Return the global singleton network instance.
|
||||
Note that this can return None! If we are run with the --offline flag, there is no network.
|
||||
"""
|
||||
return _INSTANCE
|
||||
|
||||
def with_recent_servers_lock(func):
|
||||
|
||||
Reference in New Issue
Block a user