Skip to content

Commit 2e31c74

Browse files
committed
follow-up prev: fix for multisig
1 parent 0928ffb commit 2e31c74

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

electrum/hw_wallet/qt.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from typing import TYPE_CHECKING, Union, Optional, Sequence, Tuple
3030

3131
from PyQt6.QtCore import QObject, pyqtSignal, Qt
32-
from PyQt6.QtWidgets import QVBoxLayout, QLineEdit, QHBoxLayout, QLabel
32+
from PyQt6.QtWidgets import QVBoxLayout, QLineEdit, QHBoxLayout, QLabel, QMenu
3333

3434
from electrum.gui.common_qt.util import TaskThread
3535
from electrum.gui.qt.password_dialog import PasswordLayout, PW_PASSPHRASE
@@ -301,13 +301,12 @@ def show_address():
301301
def create_handler(self, window: Union['ElectrumWindow', 'QENewWalletWizard']) -> 'QtHandlerBase':
302302
raise NotImplementedError()
303303

304-
def _add_menu_action(self, menu, address, wallet):
305-
keystore = wallet.get_keystore()
306-
if type(keystore) != self.keystore_class:
307-
return
304+
def _add_menu_action(self, menu: QMenu, address: str, wallet: 'Abstract_Wallet'):
308305
if not wallet.is_mine(address):
309306
return
310-
def show_address():
311-
keystore.thread.add(partial(self.show_address, wallet, address, keystore=keystore))
312-
device_name = "{} ({})".format(self.device, keystore.label)
313-
menu.addAction(read_QIcon("eye1.png"), _("Show address on {}").format(device_name), show_address)
307+
for keystore in wallet.get_keystores():
308+
if type(keystore) == self.keystore_class:
309+
def show_address(keystore=keystore):
310+
keystore.thread.add(partial(self.show_address, wallet, address, keystore=keystore))
311+
device_name = "{} ({})".format(self.device, keystore.label)
312+
menu.addAction(read_QIcon("eye1.png"), _("Show address on {}").format(device_name), show_address)

0 commit comments

Comments
 (0)