hardware wallets: wizard no longer requests xpub at path "m"
This was done to calculate the bip32 root fingerprint but it broke the digitalbitbox. The keystore already had a different way to get the root fingerprint for existing wallets, specifically handling this case; the code in base_wizard used when creating new wallets was duplicating that code originally and was then forgotten to be updated. Now these codepaths are unified. closes #5816
This commit is contained in:
@@ -175,6 +175,13 @@ class HardwareClientBase:
|
||||
def get_xpub(self, bip32_path: str, xtype) -> str:
|
||||
raise NotImplementedError()
|
||||
|
||||
def request_root_fingerprint_from_device(self) -> str:
|
||||
# digitalbitbox (at least) does not reveal xpubs corresponding to unhardened paths
|
||||
# so ask for a direct child, and read out fingerprint from that:
|
||||
child_of_root_xpub = self.get_xpub("m/0'", xtype='standard')
|
||||
root_fingerprint = BIP32Node.from_xkey(child_of_root_xpub).fingerprint.hex().lower()
|
||||
return root_fingerprint
|
||||
|
||||
|
||||
def is_any_tx_output_on_change_branch(tx: PartialTransaction) -> bool:
|
||||
return any([txout.is_change for txout in tx.outputs()])
|
||||
|
||||
Reference in New Issue
Block a user