tMerge pull request #6766 from benma/bb02 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 1bf8d2ea56eacc6117824aab2e561822731ccc63 DIR parent eaacecf4a17d848a449c84970168161fc4890329 HTML Author: ghost43 <somber.night@protonmail.com> Date: Tue, 24 Nov 2020 20:42:22 +0000 Merge pull request #6766 from benma/bb02 bitbox02: more robust account keypath Diffstat: M electrum/plugins/bitbox02/bitbox02… | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) --- DIR diff --git a/electrum/plugins/bitbox02/bitbox02.py b/electrum/plugins/bitbox02/bitbox02.py t@@ -293,8 +293,7 @@ class BitBox02Client(HardwareClientBase): raise Exception( "Need to setup communication first before attempting any BitBox02 calls" ) - - account_keypath = bip32_path[:4] + account_keypath = bip32_path[:-2] xpubs = wallet.get_master_public_keys() our_xpub = self.get_xpub( bip32.convert_bip32_intpath_to_strpath(account_keypath), xtype t@@ -504,15 +503,7 @@ class BitBox02Client(HardwareClientBase): ) ) - if type(wallet) is Standard_Wallet: - keypath_account = full_path[:3] - elif type(wallet) is Multisig_Wallet: - keypath_account = full_path[:4] - else: - raise Exception( - "BitBox02 does not support this wallet type: {}".format(type(wallet)) - ) - + keypath_account = full_path[:-2] sigs = self.bitbox02_device.btc_sign( coin, [bitbox02.btc.BTCScriptConfigWithKeypath(