diff --git a/multibls/multibls.go b/multibls/multibls.go index 43c266c14..7542a1314 100644 --- a/multibls/multibls.go +++ b/multibls/multibls.go @@ -17,7 +17,10 @@ type PublicKey struct { } // SerializeToHexStr wrapper -func (multiKey PublicKey) SerializeToHexStr() string { +func (multiKey *PublicKey) SerializeToHexStr() string { + if multiKey == nil { + return "" + } var builder strings.Builder for _, pubKey := range multiKey.PublicKey { builder.WriteString(pubKey.SerializeToHexStr())