diff --git a/proto/OmniFlix/itc/v1/itc.proto b/proto/OmniFlix/itc/v1/itc.proto index 0a5a27f..8f4da3a 100644 --- a/proto/OmniFlix/itc/v1/itc.proto +++ b/proto/OmniFlix/itc/v1/itc.proto @@ -110,7 +110,7 @@ message NFTDetails { string data = 10; string uri_hash = 11; uint64 start_index = 12; - string name_delimeter = 13; + string name_delimiter = 13; } message Claim { diff --git a/x/itc/client/cli/utils.go b/x/itc/client/cli/utils.go index 2eb3a43..6f37fce 100644 --- a/x/itc/client/cli/utils.go +++ b/x/itc/client/cli/utils.go @@ -28,7 +28,7 @@ func validate(nft *types.NFTDetails) error { if nft.StartIndex <= 0 { return fmt.Errorf("start index is required and should be greater than 0") } - if nft.NameDelimeter != "" && len(nft.NameDelimeter) > 1 { + if nft.NameDelimiter != "" && len(nft.NameDelimiter) > 1 { return fmt.Errorf("name delemeter should be a single character string") } return nil diff --git a/x/itc/keeper/campaign.go b/x/itc/keeper/campaign.go index f04af55..e9980a0 100644 --- a/x/itc/keeper/campaign.go +++ b/x/itc/keeper/campaign.go @@ -188,7 +188,7 @@ func (k Keeper) Claim(ctx sdk.Context, campaign types.Campaign, claimer sdk.AccA nftTitle := fmt.Sprintf( "%s %s%d", campaign.NftMintDetails.Name, - campaign.NftMintDetails.NameDelimeter, + campaign.NftMintDetails.NameDelimiter, nftIndex, ) if err := k.nftKeeper.MintONFT( diff --git a/x/itc/types/itc.pb.go b/x/itc/types/itc.pb.go index 0d55673..77f1875 100644 --- a/x/itc/types/itc.pb.go +++ b/x/itc/types/itc.pb.go @@ -244,7 +244,7 @@ type NFTDetails struct { Data string `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"` UriHash string `protobuf:"bytes,11,opt,name=uri_hash,json=uriHash,proto3" json:"uri_hash,omitempty"` StartIndex uint64 `protobuf:"varint,12,opt,name=start_index,json=startIndex,proto3" json:"start_index,omitempty"` - NameDelimeter string `protobuf:"bytes,13,opt,name=name_delimeter,json=nameDelimeter,proto3" json:"name_delimeter,omitempty"` + NameDelimiter string `protobuf:"bytes,13,opt,name=name_delimiter,json=nameDelimiter,proto3" json:"name_delimiter,omitempty"` } func (m *NFTDetails) Reset() { *m = NFTDetails{} } @@ -394,7 +394,7 @@ var fileDescriptor_bab9913014645745 = []byte{ 0xb5, 0xac, 0x80, 0xe5, 0x5a, 0xf4, 0x79, 0x1a, 0x31, 0xe7, 0x8c, 0xc4, 0x67, 0x52, 0xa2, 0x0a, 0x78, 0x7d, 0x1a, 0xb1, 0xa7, 0x24, 0x3e, 0x13, 0x4d, 0x51, 0x0f, 0x0b, 0x0b, 0x5c, 0x7a, 0x21, 0xe5, 0x65, 0x15, 0xab, 0x77, 0xca, 0x12, 0x08, 0xfa, 0x02, 0xca, 0xa2, 0xf9, 0x8e, 0x4b, 0x3d, - 0xe6, 0x53, 0x4e, 0x23, 0xa9, 0x11, 0x05, 0xbc, 0x21, 0xd0, 0x4e, 0x0a, 0x1a, 0xbf, 0x6a, 0xb0, + 0xe6, 0x33, 0x4e, 0x23, 0xa9, 0x11, 0x05, 0xbc, 0x21, 0xd0, 0x4e, 0x0a, 0x1a, 0xbf, 0x6a, 0xb0, 0xa6, 0x14, 0xab, 0x06, 0xc5, 0x51, 0xf2, 0x70, 0x3a, 0xd7, 0xaf, 0x26, 0xa4, 0x90, 0xe5, 0x8a, 0x97, 0x85, 0xb8, 0x6e, 0x44, 0xe3, 0x38, 0x39, 0xdd, 0x74, 0x8b, 0xee, 0xc3, 0x6d, 0x75, 0xff, 0x93, 0xb3, 0x5d, 0x0b, 0xc4, 0xdd, 0x5f, 0x16, 0xfa, 0xd5, 0x4f, 0x10, 0xfa, 0xfd, 0x23, 0xa8, @@ -413,7 +413,7 @@ var fileDescriptor_bab9913014645745 = []byte{ 0x5d, 0x55, 0x7b, 0xf5, 0xbe, 0x9a, 0x7b, 0xf3, 0xbe, 0x9a, 0xfb, 0xe3, 0x7d, 0x35, 0xf7, 0xc2, 0xcc, 0xdc, 0xa9, 0xeb, 0x3f, 0x85, 0xa1, 0x1f, 0xb0, 0xb1, 0xc7, 0x2e, 0xce, 0xa6, 0xc3, 0xc6, 0xec, 0x71, 0x43, 0xfd, 0x4b, 0x94, 0xf7, 0x6b, 0x78, 0x5b, 0xaa, 0xcd, 0xe3, 0x7f, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x03, 0xa5, 0x30, 0x83, 0x42, 0x0a, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xa1, 0x97, 0xd7, 0x3d, 0x42, 0x0a, 0x00, 0x00, } func (m *Campaign) Marshal() (dAtA []byte, err error) { @@ -638,10 +638,10 @@ func (m *NFTDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.NameDelimeter) > 0 { - i -= len(m.NameDelimeter) - copy(dAtA[i:], m.NameDelimeter) - i = encodeVarintItc(dAtA, i, uint64(len(m.NameDelimeter))) + if len(m.NameDelimiter) > 0 { + i -= len(m.NameDelimiter) + copy(dAtA[i:], m.NameDelimiter) + i = encodeVarintItc(dAtA, i, uint64(len(m.NameDelimiter))) i-- dAtA[i] = 0x6a } @@ -929,7 +929,7 @@ func (m *NFTDetails) Size() (n int) { if m.StartIndex != 0 { n += 1 + sovItc(uint64(m.StartIndex)) } - l = len(m.NameDelimeter) + l = len(m.NameDelimiter) if l > 0 { n += 1 + l + sovItc(uint64(l)) } @@ -1996,7 +1996,7 @@ func (m *NFTDetails) Unmarshal(dAtA []byte) error { } case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NameDelimeter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NameDelimiter", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2024,7 +2024,7 @@ func (m *NFTDetails) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NameDelimeter = string(dAtA[iNdEx:postIndex]) + m.NameDelimiter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/itc/types/validation.go b/x/itc/types/validation.go index 12d5116..a17092e 100644 --- a/x/itc/types/validation.go +++ b/x/itc/types/validation.go @@ -120,8 +120,7 @@ func ValidateTokens(tokensA, tokensB sdk.Coin) error { } func validateNFTMintDetails(details *NFTDetails) error { - if details == nil || len(details.Name) == 0 || len(details.DenomId) == 0 || len(details.MediaUri) == 0 || - details.StartIndex <= 0 || len(details.NameDelimeter) != 1 { + if details == nil || len(details.Name) == 0 || len(details.DenomId) == 0 || len(details.MediaUri) == 0 { return errorsmod.Wrapf( ErrInvalidNFTMintDetails, "invalid nft mint details, details should not be nil and name, media_uri can not be empty.") @@ -131,7 +130,7 @@ func validateNFTMintDetails(details *NFTDetails) error { ErrInvalidNFTMintDetails, "invalid nft mint details, Start Index should be a possitive number.") } - if len(details.NameDelimeter) != 1 { + if len(details.NameDelimiter) != 1 { return errorsmod.Wrapf( ErrInvalidNFTMintDetails, "invalid nft mint details, Name delemeter should be a symbol string length of one.")