Skip to content

Commit

Permalink
fix: return empty if publickey is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
agparadiso committed Nov 25, 2024
1 parent 65cca60 commit c94a6f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/services/keystore/keys/workflowkey/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,18 @@ func New() (Key, error) {
}

func (k Key) PublicKey() [curve25519.PointSize]byte {
if k.publicKey == nil {
return [curve25519.PointSize]byte{}
}

return *k.publicKey
}

func (k Key) PublicKeyString() string {
if k.publicKey == nil {
return ""
}

return hex.EncodeToString(k.publicKey[:])
}

Expand Down

0 comments on commit c94a6f6

Please sign in to comment.