Skip to content

Commit 56684c0

Browse files
committed
follow-up 2119bf2
1 parent 2119bf2 commit 56684c0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

electrum/gui/qt/swap_dialog.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
from PyQt6.QtWidgets import QLabel, QVBoxLayout, QGridLayout, QPushButton
77
from PyQt6.QtWidgets import QTreeWidget, QTreeWidgetItem, QHeaderView
88

9+
from electrum_aionostr.util import from_nip19
10+
911
from electrum.i18n import _
1012
from electrum.util import NotEnoughFunds, NoDynamicFeeEstimates, UserCancelled
1113
from electrum.bitcoin import DummyAddress
@@ -268,9 +270,8 @@ def update(self):
268270
self.server_fee_label.setText(server_fee_str)
269271
self.server_fee_label.repaint() # macOS hack for #6269
270272
self.needs_tx_update = True
271-
272-
current_offer = transport.get_offer(self.config.SWAPSERVER_NPUB) if not self.config.SWAPSERVER_URL else None
273-
pubkey = current_offer.server_pubkey if current_offer else ''
273+
# update icon
274+
pubkey = from_nip19(self.config.SWAPSERVER_NPUB)['object'].hex() if self.config.SWAPSERVER_NPUB else ''
274275
self.server_button.setIcon(SwapServerDialog._pubkey_to_q_icon(pubkey))
275276

276277
def get_client_swap_limits_sat(self) -> Tuple[int, int]:

0 commit comments

Comments
 (0)