1
0

qml: don't initialize swaphelper if a non-lightning wallet is opened

Due to swaphelper's lifecycle (it is kept around longer than the swap dialog) it might
get initialized with a non-lightning wallet. don't initialize in that case.

proper fix is to tie the lifecycle to the swap process, or make it a child of the wallet.
This commit is contained in:
Sander van Grieken
2023-03-03 10:53:03 +01:00
parent 41f0f73bed
commit 72b07a3630

View File

@@ -182,6 +182,8 @@ class QESwapHelper(AuthMixin, QObject):
def init_swap_slider_range(self):
lnworker = self._wallet.wallet.lnworker
if not lnworker:
return
swap_manager = lnworker.swap_manager
try:
asyncio.run(swap_manager.get_pairs())