Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Oct 19, 2020
1 parent e5b2e20 commit 8a3a1ac
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions hd_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,11 @@ func GenerateHDKeyPair(seedLength uint8) (xPrivateKey, xPublicKey string, err er
return
}

// Set the xPriv
// Set the xPriv (string)
xPrivateKey = masterKey.String()

// Create the extended public key
var pubKey *hdkeychain.ExtendedKey
if pubKey, err = masterKey.Neuter(); err != nil {
// Error should nearly never occur since it's using a safely derived masterKey
return
}

// Set the actual xPub
xPublicKey = pubKey.String()
// Set the xPub (string)
xPublicKey, err = GetExtendedPublicKey(masterKey)

return
}
Expand Down

0 comments on commit 8a3a1ac

Please sign in to comment.