Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
harish551 committed Apr 16, 2024
1 parent 6dd2b27 commit 678f5ee
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion proto/OmniFlix/itc/v1/itc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion x/itc/keeper/campaign.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
20 changes: 10 additions & 10 deletions x/itc/types/itc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions x/itc/types/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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.")
Expand Down

0 comments on commit 678f5ee

Please sign in to comment.