Browse Source
Merge pull request #6766 from benma/bb02
bitbox02: more robust account keypath
patch-4
ghost43
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
11 deletions
-
electrum/plugins/bitbox02/bitbox02.py
|
|
@ -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 |
|
|
@ -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( |
|
|
|