diff --git a/x/asset/keeper/query_address.go b/x/asset/keeper/query_address.go index 76825e9..6bb7c05 100644 --- a/x/asset/keeper/query_address.go +++ b/x/asset/keeper/query_address.go @@ -18,7 +18,7 @@ func (k Keeper) GetCIDsByAddress(goCtx context.Context, req *types.QueryGetCIDsB ctx := sdk.UnwrapSDKContext(goCtx) - cids, found := k.GetAssetsByAddress(ctx, req.GetAddress(), nil, util.SerializeUint64(req.GetNumElements()+1)) + cids, found := k.GetAssetsByAddress(ctx, req.GetAddress(), nil, util.SerializeUint64(req.GetNumElements())) if !found { return nil, status.Error(codes.NotFound, "no CIDs found") } diff --git a/x/asset/keeper/query_address_test.go b/x/asset/keeper/query_address_test.go index 22521c0..dea2dbd 100644 --- a/x/asset/keeper/query_address_test.go +++ b/x/asset/keeper/query_address_test.go @@ -17,7 +17,7 @@ func TestGetNotarizedAssetByAddress(t *testing.T) { keeper, ctx := keepertest.AssetKeeper(t) wctx := sdk.WrapSDKContext(ctx) _ = createNAsset(keeper, ctx, 10) - assets, _ := keeper.GetAssetsByAddress(ctx, "plmnt_address", nil, util.SerializeUint64(3+1)) + assets, _ := keeper.GetAssetsByAddress(ctx, "plmnt_address", nil, util.SerializeUint64(3)) for _, tc := range []struct { desc string request *types.QueryGetCIDsByAddressRequest