Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix name delimiter spelling #169

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/client/cli/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Loading