Skip to content

Commit d9db7ad

Browse files
author
Kim Neunert
committed
Merge branch 'master' of github.com:cryptoadvance/spectrum
2 parents e43dcd6 + 13d51af commit d9db7ad

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/cryptoadvance/specterext/spectrum/spectrum_node.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from cryptoadvance.specterext.spectrum.bridge_rpc import BridgeRPC
33
from cryptoadvance.specter.helpers import deep_update
44
from cryptoadvance.specter.node import AbstractNode
5+
from cryptoadvance.specter.devices.bitcoin_core import BitcoinCore
56
from cryptoadvance.specter.specter_error import BrokenCoreConnectionException
67
from cryptoadvance.spectrum.spectrum import Spectrum
78

@@ -173,6 +174,18 @@ def update_rpc(self):
173174
''' No need to do anything '''
174175
pass
175176

177+
def is_device_supported(self, device_class_or_device_instance):
178+
""" Returns False if a device is not supported for Spectrum nodes, True otherwise.
179+
Currently, Bitcoin Core hot wallets are not supported """
180+
# If a device class is passed as argument, take that, otherwise derive the class from the instance
181+
if device_class_or_device_instance.__class__ == type:
182+
device_class = device_class_or_device_instance
183+
else:
184+
device_class = device_class_or_device_instance.__class__
185+
if device_class == BitcoinCore:
186+
return False
187+
return True
188+
176189
def node_info_template(self):
177190
return "spectrum/components/spectrum_info.jinja"
178191

0 commit comments

Comments
 (0)