fix: allow to set token permission as a private

This commit is contained in:
mprakhov 2023-06-09 10:51:16 +02:00 committed by Follow the white rabbit
parent 6bc8765d39
commit 83ed3e5ede
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ type CreateCommunityTokenPermission struct {
CommunityID types.HexBytes `json:"communityId"` CommunityID types.HexBytes `json:"communityId"`
Type protobuf.CommunityTokenPermission_Type `json:"type"` Type protobuf.CommunityTokenPermission_Type `json:"type"`
TokenCriteria []*protobuf.TokenCriteria `json:"tokenCriteria"` TokenCriteria []*protobuf.TokenCriteria `json:"tokenCriteria"`
IsPrivate bool `json:"isPrivate"`
} }
func (p *CreateCommunityTokenPermission) Validate() error { func (p *CreateCommunityTokenPermission) Validate() error {
@ -54,5 +55,6 @@ func (p *CreateCommunityTokenPermission) ToCommunityTokenPermission() protobuf.C
return protobuf.CommunityTokenPermission{ return protobuf.CommunityTokenPermission{
Type: p.Type, Type: p.Type,
TokenCriteria: p.TokenCriteria, TokenCriteria: p.TokenCriteria,
IsPrivate: p.IsPrivate,
} }
} }