1
0

psbt: follow-ups: fix digital bitbox

This commit is contained in:
SomberNight
2019-11-05 22:06:46 +01:00
parent 9e86352022
commit dd14a3fde5
4 changed files with 28 additions and 4 deletions

View File

@@ -707,8 +707,10 @@ class Hardware_KeyStore(KeyStore, Xpub):
def opportunistically_fill_in_missing_info_from_device(self, client):
assert client is not None
if self._root_fingerprint is None:
root_xpub = client.get_xpub('m', xtype='standard')
root_fingerprint = BIP32Node.from_xkey(root_xpub).calc_fingerprint_of_this_node().hex().lower()
# 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 = client.get_xpub("m/0'", xtype='standard')
root_fingerprint = BIP32Node.from_xkey(child_of_root_xpub).fingerprint.hex().lower()
self._root_fingerprint = root_fingerprint
self.is_requesting_to_be_rewritten_to_wallet_file = True