Browse Source

qt tx dlg: follow-up "send tx change to lightning"

lnworker is None if lightning is disabled.
follow-up 649ce979ab

```
 15.14 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\rate_limiter.py", line 231, in wrapper
    return RateLimiter.invoke(rate, ts_after, func, args, kwargs)
  File "...\electrum\electrum\gui\qt\rate_limiter.py", line 79, in invoke
    return rl._invoke(args, kwargs)
  File "...\electrum\electrum\gui\qt\rate_limiter.py", line 91, in _invoke
    return self._doIt()
  File "...\electrum\electrum\gui\qt\rate_limiter.py", line 120, in _doIt
    retval = self.func(*args, **kwargs) # and.. call the function. use latest invocation's args
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 745, in _throttled_update
    self.update()
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 750, in update
    self.io_widget.update(self.tx)
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 243, in update
    insert_tx_io(
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 205, in insert_tx_io
    tcf_addr = addr_text_format(addr)
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 173, in addr_text_format
    sm = self.wallet.lnworker.swap_manager
AttributeError: 'NoneType' object has no attribute 'swap_manager'
```
master
SomberNight 2 years ago
parent
commit
956b455954
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/gui/qt/transaction_dialog.py

2
electrum/gui/qt/transaction_dialog.py

@ -170,7 +170,7 @@ class TxInOutWidget(QWidget):
tf_used_recv, tf_used_change, tf_used_2fa, tf_used_swap = False, False, False, False tf_used_recv, tf_used_change, tf_used_2fa, tf_used_swap = False, False, False, False
def addr_text_format(addr: str) -> QTextCharFormat: def addr_text_format(addr: str) -> QTextCharFormat:
nonlocal tf_used_recv, tf_used_change, tf_used_2fa, tf_used_swap nonlocal tf_used_recv, tf_used_change, tf_used_2fa, tf_used_swap
sm = self.wallet.lnworker.swap_manager sm = self.wallet.lnworker.swap_manager if self.wallet.lnworker else None
if self.wallet.is_mine(addr): if self.wallet.is_mine(addr):
if self.wallet.is_change(addr): if self.wallet.is_change(addr):
tf_used_change = True tf_used_change = True

Loading…
Cancel
Save