mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-04 21:36:45 +00:00
fix computation of master fingerprint for satochip
This commit is contained in:
parent
f4ac18c3e1
commit
910a400b18
1 changed files with 3 additions and 1 deletions
|
@ -139,7 +139,9 @@ public class SatoCardApi extends CardApi {
|
||||||
ExtendedKey.Header xtype = Network.get().getXpubHeader();
|
ExtendedKey.Header xtype = Network.get().getXpubHeader();
|
||||||
String xpub = this.cardProtocol.cardBip32GetXpub(keyDerivationString, xtype);
|
String xpub = this.cardProtocol.cardBip32GetXpub(keyDerivationString, xtype);
|
||||||
ExtendedKey extendedKey = ExtendedKey.fromDescriptor(xpub);
|
ExtendedKey extendedKey = ExtendedKey.fromDescriptor(xpub);
|
||||||
String masterFingerprint = Utils.bytesToHex(extendedKey.getKey().getFingerprint());
|
String masterXpub = this.cardProtocol.cardBip32GetXpub("m", xtype);
|
||||||
|
ExtendedKey masterExtendedKey = ExtendedKey.fromDescriptor(masterXpub);
|
||||||
|
String masterFingerprint = Utils.bytesToHex(masterExtendedKey.getKey().getFingerprint());
|
||||||
KeyDerivation keyDerivation = new KeyDerivation(masterFingerprint, keyDerivationString);
|
KeyDerivation keyDerivation = new KeyDerivation(masterFingerprint, keyDerivationString);
|
||||||
|
|
||||||
Keystore keystore = new Keystore();
|
Keystore keystore = new Keystore();
|
||||||
|
|
Loading…
Reference in a new issue