Skip to content

Commit

Permalink
Merge pull request #287 from irisnet/optimization
Browse files Browse the repository at this point in the history
apply some comments
  • Loading branch information
aofengli authored Mar 10, 2022
2 parents 67c1090 + f954466 commit e57d01c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions modules/nft/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func (k Keeper) Owner(c context.Context, request *types.QueryOwnerRequest) (*typ
}
return nil
})
if err != nil {
return nil, err
}
for i := 0; i < len(owner.IDCollections); i++ {
owner.IDCollections[i].TokenIds = idsMap[owner.IDCollections[i].DenomId]
}
Expand Down
2 changes: 1 addition & 1 deletion modules/nft/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (m msgServer) MintNFT(goCtx context.Context, msg *types.MsgMintNFT) (*types
}

if denom.MintRestricted && denom.Creator != sender.String() {
return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to mint NFT of denom %s", denom.Creator, msg.DenomId)
return nil, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "%s is not allowed to mint NFT of denom %s", msg.Sender, msg.DenomId)
}

if err := m.Keeper.MintNFT(ctx, msg.DenomId, msg.Id,
Expand Down

0 comments on commit e57d01c

Please sign in to comment.