Merge pull request #62 from libp2p/fix-allowlist-marshalling

fix marshalling of allowlisted scopes
This commit is contained in:
Marco Munizaga 2022-07-03 07:24:05 -07:00 committed by GitHub
commit b2c739f8ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ func (s scopeClass) MarshalJSON() ([]byte, error) {
span = name[idx+5:]
}
// System and Transient scope
if name == "system" || name == "transient" {
if name == "system" || name == "transient" || name == "allowlistedSystem" || name == "allowlistedTransient" {
return json.Marshal(struct {
Class string
Span string `json:",omitempty"`