hardware wallets: pass xtype to get_xpub
This commit is contained in:
@@ -34,6 +34,7 @@ import threading
|
||||
from .util import *
|
||||
from .i18n import _
|
||||
from .util import profiler, PrintError, DaemonThread, UserCancelled, ThreadJob
|
||||
from . import bitcoin
|
||||
|
||||
plugin_loaders = {}
|
||||
hook_names = set()
|
||||
@@ -421,14 +422,14 @@ class DeviceMgr(ThreadJob, PrintError):
|
||||
def force_pair_xpub(self, plugin, handler, info, xpub, derivation, devices):
|
||||
# The wallet has not been previously paired, so let the user
|
||||
# choose an unpaired device and compare its first address.
|
||||
|
||||
xtype = bitcoin.xpub_type(xpub)
|
||||
client = self.client_lookup(info.device.id_)
|
||||
if client and client.is_pairable():
|
||||
# See comment above for same code
|
||||
client.handler = handler
|
||||
# This will trigger a PIN/passphrase entry request
|
||||
try:
|
||||
client_xpub = client.get_xpub(derivation)
|
||||
client_xpub = client.get_xpub(derivation, xtype)
|
||||
except (UserCancelled, RuntimeError):
|
||||
# Bad / cancelled PIN / passphrase
|
||||
client_xpub = None
|
||||
|
||||
Reference in New Issue
Block a user