lnd: fix another bug in key derivation

Turns out, the same "we create a default account immediately but any
other account is loaded from the DB" rule applies to the coin type key
too.
pull/44/head
Oliver Gugger 2 years ago
parent 942075218c
commit ece46945b1
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

@ -45,7 +45,7 @@ func DeriveChildren(key *hdkeychain.ExtendedKey, path []uint32) (
// derived directly.
depth := derivedKey.Depth()
keyID := pathPart - hdkeychain.HardenedKeyStart
if (depth == 3 && keyID != 0) || depth == 2 {
if (depth == 3 && keyID != 0) || (depth == 2 && keyID != 0) {
currentKey, err = hdkeychain.NewKeyFromString(
derivedKey.String(),
)

Loading…
Cancel
Save