Skip to content

Commit

Permalink
Do not check existence of collection in Query/Balance
Browse files Browse the repository at this point in the history
  • Loading branch information
0Tech committed Apr 9, 2023
1 parent 0c74e6f commit 029c26a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions x/collection/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ func (s queryServer) Balance(c context.Context, req *collection.QueryBalanceRequ
return nil, err
}

if err := s.validateExistenceOfCollectionGRPC(ctx, req.ContractId); err != nil {
return nil, err
}

balance := s.keeper.GetBalance(ctx, req.ContractId, addr, req.TokenId)
coin := collection.Coin{
TokenId: req.TokenId,
Expand Down
5 changes: 0 additions & 5 deletions x/collection/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ func (s *KeeperTestSuite) TestQueryBalance() {
address: sdk.AccAddress("notfound"),
tokenID: tokenID,
},
"collection not found": {
contractID: "deadbeef",
address: s.vendor,
tokenID: tokenID,
},
}

for name, tc := range testCases {
Expand Down

0 comments on commit 029c26a

Please sign in to comment.