Skip to content

Commit

Permalink
refactor: make identity err func private
Browse files Browse the repository at this point in the history
  • Loading branch information
Lodek committed Jun 14, 2024
1 parent d28db70 commit 3b3bbe8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion acp/identity/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const errDIDCreation = "could not produce did for key"

var ErrDIDCreation = errors.New(errDIDCreation)

func NewErrDIDCreation(inner error, keytype string, pubKey []byte) error {
func newErrDIDCreation(inner error, keytype string, pubKey []byte) error {
return errors.Wrap(
errDIDCreation,
inner,
Expand Down
2 changes: 1 addition & 1 deletion acp/identity/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func didFromPublicKey(publicKey *secp256k1.PublicKey, producer didProducer) (str
bytes := publicKey.SerializeUncompressed()
did, err := producer(crypto.SECP256k1, bytes)
if err != nil {
return "", NewErrDIDCreation(err, "secp256k1", bytes)
return "", newErrDIDCreation(err, "secp256k1", bytes)
}
return did.String(), nil
}

0 comments on commit 3b3bbe8

Please sign in to comment.