Skip to content

Commit

Permalink
addresed PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
miladz68 committed Oct 24, 2023
1 parent 745d2dd commit 60986f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/asset/nft/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -947,25 +947,25 @@ func (k Keeper) isNFTSendable(ctx sdk.Context, classID, nftID string) error {
return sdkerrors.Wrapf(cosmoserrors.ErrUnauthorized, "nft with classID:%s and ID:%s has sending disabled", classID, nftID)
}

frozen, err := k.IsFrozen(ctx, classID, nftID)
isFrozen, err := k.IsFrozen(ctx, classID, nftID)
if err != nil {
if errors.Is(err, types.ErrFeatureDisabled) {
return nil
}
return err
}
if frozen {
if isFrozen {
return sdkerrors.Wrapf(cosmoserrors.ErrUnauthorized, "nft with classID:%s and ID:%s is frozen", classID, nftID)
}

classFrozen, err := k.IsClassFrozen(ctx, classID, owner)
isClassFrozen, err := k.IsClassFrozen(ctx, classID, owner)
if err != nil {
if errors.Is(err, types.ErrFeatureDisabled) {
return nil
}
return err
}
if classFrozen {
if isClassFrozen {
return sdkerrors.Wrapf(cosmoserrors.ErrUnauthorized, "nft with classID:%s and ID:%s is class frozen", classID, nftID)
}
return nil
Expand Down

0 comments on commit 60986f4

Please sign in to comment.