Skip to content

Commit f79172c

Browse files
committed
qml: sweep: handle network errors gracefully
fixes #10108
1 parent 01694a3 commit f79172c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

electrum/gui/qml/qetxfinalizer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from electrum import keystore
1717
from electrum.plugin import run_hook
1818
from electrum.fee_policy import FeePolicy, FeeMethod
19+
from electrum.network import NetworkException
1920

2021
from .qewallet import QEWallet
2122
from .qetypes import QEAmount
@@ -1013,6 +1014,9 @@ def fetch_privkeys_info():
10131014
try:
10141015
self._txins = self._wallet.wallet.network.run_from_another_thread(sweep_preparations(privkeys, self._wallet.wallet.network))
10151016
self._logger.debug(f'txins {self._txins!r}')
1017+
except NetworkException as e:
1018+
self.warning = _('Network error') + ': ' + str(e)
1019+
return
10161020
except UserFacingException as e:
10171021
self.warning = str(e)
10181022
return

0 commit comments

Comments
 (0)