SomberNight
7 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
7 changed files with
23 additions and
3 deletions
-
electrum/plugins/coldcard/qt.py
-
electrum/plugins/digitalbitbox/qt.py
-
electrum/plugins/hw_wallet/plugin.py
-
electrum/plugins/keepkey/qt.py
-
electrum/plugins/ledger/qt.py
-
electrum/plugins/safe_t/qt.py
-
electrum/plugins/trezor/qt.py
|
|
@ -7,6 +7,7 @@ from electrum.gui.qt.util import * |
|
|
|
|
|
|
|
from .coldcard import ColdcardPlugin |
|
|
|
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase |
|
|
|
from ..hw_wallet.plugin import only_hook_if_libraries_available |
|
|
|
|
|
|
|
|
|
|
|
class Plugin(ColdcardPlugin, QtPluginBase): |
|
|
@ -17,6 +18,7 @@ class Plugin(ColdcardPlugin, QtPluginBase): |
|
|
|
return Coldcard_Handler(window) |
|
|
|
|
|
|
|
@hook |
|
|
|
@only_hook_if_libraries_available |
|
|
|
def receive_menu(self, menu, addrs, wallet): |
|
|
|
if type(wallet) is not Standard_Wallet: |
|
|
|
return |
|
|
@ -27,6 +29,7 @@ class Plugin(ColdcardPlugin, QtPluginBase): |
|
|
|
menu.addAction(_("Show on Coldcard"), show_address) |
|
|
|
|
|
|
|
@hook |
|
|
|
@only_hook_if_libraries_available |
|
|
|
def transaction_dialog(self, dia): |
|
|
|
# see gui/qt/transaction_dialog.py |
|
|
|
|
|
|
|
|
|
@ -1,12 +1,13 @@ |
|
|
|
from functools import partial |
|
|
|
|
|
|
|
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase |
|
|
|
from .digitalbitbox import DigitalBitboxPlugin |
|
|
|
|
|
|
|
from electrum.i18n import _ |
|
|
|
from electrum.plugin import hook |
|
|
|
from electrum.wallet import Standard_Wallet |
|
|
|
|
|
|
|
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase |
|
|
|
from ..hw_wallet.plugin import only_hook_if_libraries_available |
|
|
|
from .digitalbitbox import DigitalBitboxPlugin |
|
|
|
|
|
|
|
|
|
|
|
class Plugin(DigitalBitboxPlugin, QtPluginBase): |
|
|
|
icon_unpaired = ":icons/digitalbitbox_unpaired.png" |
|
|
@ -16,6 +17,7 @@ class Plugin(DigitalBitboxPlugin, QtPluginBase): |
|
|
|
return DigitalBitbox_Handler(window) |
|
|
|
|
|
|
|
@hook |
|
|
|
@only_hook_if_libraries_available |
|
|
|
def receive_menu(self, menu, addrs, wallet): |
|
|
|
if type(wallet) is not Standard_Wallet: |
|
|
|
return |
|
|
|
|
|
@ -135,3 +135,10 @@ def trezor_validate_op_return_output_and_get_data(output: TxOutput) -> bytes: |
|
|
|
if output.value != 0: |
|
|
|
raise Exception(_("Amount for OP_RETURN output must be zero.")) |
|
|
|
return script[2:] |
|
|
|
|
|
|
|
|
|
|
|
def only_hook_if_libraries_available(func): |
|
|
|
def wrapper(self, *args, **kwargs): |
|
|
|
if not self.libraries_available: return None |
|
|
|
return func(self, *args, **kwargs) |
|
|
|
return wrapper |
|
|
|
|
|
@ -12,6 +12,7 @@ from electrum.util import PrintError, UserCancelled, bh2u |
|
|
|
from electrum.wallet import Wallet, Standard_Wallet |
|
|
|
|
|
|
|
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase |
|
|
|
from ..hw_wallet.plugin import only_hook_if_libraries_available |
|
|
|
from .keepkey import KeepKeyPlugin, TIM_NEW, TIM_RECOVER, TIM_MNEMONIC |
|
|
|
|
|
|
|
|
|
|
@ -195,6 +196,7 @@ class QtPlugin(QtPluginBase): |
|
|
|
return QtHandler(window, self.pin_matrix_widget_class(), self.device) |
|
|
|
|
|
|
|
@hook |
|
|
|
@only_hook_if_libraries_available |
|
|
|
def receive_menu(self, menu, addrs, wallet): |
|
|
|
if type(wallet) is not Standard_Wallet: |
|
|
|
return |
|
|
|
|
|
@ -7,6 +7,7 @@ from electrum.gui.qt.util import * |
|
|
|
|
|
|
|
from .ledger import LedgerPlugin |
|
|
|
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase |
|
|
|
from ..hw_wallet.plugin import only_hook_if_libraries_available |
|
|
|
|
|
|
|
|
|
|
|
class Plugin(LedgerPlugin, QtPluginBase): |
|
|
@ -17,6 +18,7 @@ class Plugin(LedgerPlugin, QtPluginBase): |
|
|
|
return Ledger_Handler(window) |
|
|
|
|
|
|
|
@hook |
|
|
|
@only_hook_if_libraries_available |
|
|
|
def receive_menu(self, menu, addrs, wallet): |
|
|
|
if type(wallet) is not Standard_Wallet: |
|
|
|
return |
|
|
|
|
|
@ -12,6 +12,7 @@ from electrum.util import PrintError, UserCancelled, bh2u |
|
|
|
from electrum.wallet import Wallet, Standard_Wallet |
|
|
|
|
|
|
|
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase |
|
|
|
from ..hw_wallet.plugin import only_hook_if_libraries_available |
|
|
|
from .safe_t import SafeTPlugin, TIM_NEW, TIM_RECOVER, TIM_MNEMONIC |
|
|
|
|
|
|
|
|
|
|
@ -71,6 +72,7 @@ class QtPlugin(QtPluginBase): |
|
|
|
return QtHandler(window, self.pin_matrix_widget_class(), self.device) |
|
|
|
|
|
|
|
@hook |
|
|
|
@only_hook_if_libraries_available |
|
|
|
def receive_menu(self, menu, addrs, wallet): |
|
|
|
if len(addrs) != 1: |
|
|
|
return |
|
|
|
|
|
@ -12,6 +12,7 @@ from electrum.util import PrintError, UserCancelled, bh2u |
|
|
|
from electrum.wallet import Wallet, Standard_Wallet |
|
|
|
|
|
|
|
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase |
|
|
|
from ..hw_wallet.plugin import only_hook_if_libraries_available |
|
|
|
from .trezor import (TrezorPlugin, TIM_NEW, TIM_RECOVER, TIM_MNEMONIC, |
|
|
|
RECOVERY_TYPE_SCRAMBLED_WORDS, RECOVERY_TYPE_MATRIX) |
|
|
|
|
|
|
@ -166,6 +167,7 @@ class QtPlugin(QtPluginBase): |
|
|
|
return QtHandler(window, self.pin_matrix_widget_class(), self.device) |
|
|
|
|
|
|
|
@hook |
|
|
|
@only_hook_if_libraries_available |
|
|
|
def receive_menu(self, menu, addrs, wallet): |
|
|
|
if len(addrs) != 1: |
|
|
|
return |
|
|
|