integrate PSBT support natively. WIP
This commit is contained in:
@@ -2,7 +2,7 @@ from functools import partial
|
||||
|
||||
from electrum.i18n import _
|
||||
from electrum.plugin import hook
|
||||
from electrum.wallet import Standard_Wallet
|
||||
from electrum.wallet import Standard_Wallet, Abstract_Wallet
|
||||
|
||||
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase
|
||||
from ..hw_wallet.plugin import only_hook_if_libraries_available
|
||||
@@ -18,7 +18,7 @@ class Plugin(DigitalBitboxPlugin, QtPluginBase):
|
||||
|
||||
@only_hook_if_libraries_available
|
||||
@hook
|
||||
def receive_menu(self, menu, addrs, wallet):
|
||||
def receive_menu(self, menu, addrs, wallet: Abstract_Wallet):
|
||||
if type(wallet) is not Standard_Wallet:
|
||||
return
|
||||
|
||||
@@ -29,12 +29,12 @@ class Plugin(DigitalBitboxPlugin, QtPluginBase):
|
||||
if not self.is_mobile_paired():
|
||||
return
|
||||
|
||||
if not keystore.is_p2pkh():
|
||||
return
|
||||
|
||||
if len(addrs) == 1:
|
||||
addr = addrs[0]
|
||||
if wallet.get_txin_type(addr) != 'p2pkh':
|
||||
return
|
||||
def show_address():
|
||||
keystore.thread.add(partial(self.show_address, wallet, addrs[0], keystore))
|
||||
keystore.thread.add(partial(self.show_address, wallet, addr, keystore))
|
||||
|
||||
menu.addAction(_("Show on {}").format(self.device), show_address)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user