Skip to content

Commit 0c6ad81

Browse files
author
AJ ONeal
committed
ref: simplify fingerprint serialization
1 parent ae80242 commit 0c6ad81

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dashhd.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,10 @@ var DashHd = ("object" === typeof module && exports) || {};
615615

616616
xkeyDv.setUint8(0, hdkey.depth);
617617

618-
let fingerprint = (hdkey.depth && hdkey.parentFingerprint) || 0x00000000;
618+
let fingerprint = 0x00000000;
619+
if (hdkey.depth > 0) {
620+
fingerprint = hdkey.parentFingerprint;
621+
}
619622
xkeyDv.setUint32(1, fingerprint, BUFFER_BE);
620623
xkeyDv.setUint32(5, hdkey.index, BUFFER_BE);
621624

0 commit comments

Comments
 (0)