Skip to content

Commit

Permalink
x/bank/keeper: fix a missing gRPC error in AllBalances
Browse files Browse the repository at this point in the history
Fixes an incoherent return which had:
    (non-nil value, non-nil-non-grpc error)
to
    (nil value, non-nil-gRPC error)

and it is a follow-up of PR #7814.
  • Loading branch information
odeke-em committed Dec 4, 2020
1 parent c6b8e5f commit 2104672
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/bank/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (k BaseKeeper) AllBalances(ctx context.Context, req *types.QueryAllBalances
})

if err != nil {
return &types.QueryAllBalancesResponse{}, err
return nil, status.Errorf(codes.InvalidArgument, "paginate: %v", err)
}

return &types.QueryAllBalancesResponse{Balances: balances, Pagination: pageRes}, nil
Expand Down

0 comments on commit 2104672

Please sign in to comment.