Skip to content

Commit

Permalink
chore(BUX-190): return named parametr in createXPrivAndXPub method
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 committed Dec 20, 2023
1 parent 491976b commit 48bd587
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xpriv/xpriv.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ func FromString(xpriv string) (Key, error) {
return keys, nil
}

func createXPrivAndXPub(seed []byte) (*bip32.ExtendedKey, *bip32.ExtendedKey, error) {
hdXpriv, err := bip32.NewMaster(seed, &chaincfg.MainNet)
func createXPrivAndXPub(seed []byte) (hdXpriv *bip32.ExtendedKey, hdXpub *bip32.ExtendedKey, err error) {
hdXpriv, err = bip32.NewMaster(seed, &chaincfg.MainNet)
if err != nil {
return nil, nil, fmt.Errorf("key generation error when creating hd private key: %w", err)
}

hdXpub, err := hdXpriv.Neuter()
hdXpub, err = hdXpriv.Neuter()
if err != nil {
return nil, nil, fmt.Errorf("key generation error when creating hd public hey: %w", err)
}
Expand Down

0 comments on commit 48bd587

Please sign in to comment.