diff --git a/src/server/routes/indexer/computer.ts b/src/server/routes/indexer/computer.ts index cd956231..4506bba4 100644 --- a/src/server/routes/indexer/computer.ts +++ b/src/server/routes/indexer/computer.ts @@ -340,6 +340,7 @@ export const computer: Router.Middleware = async (ctx) => { await WasmStateEvent.findOne({ where: { blockTimeUnixMs: { + [Op.gt]: 0, [Op.lte]: time, }, }, @@ -363,13 +364,14 @@ export const computer: Router.Middleware = async (ctx) => { await WasmStateEvent.findOne({ where: { blockTimeUnixMs: { + [Op.gt]: 0, [Op.lte]: times[0], }, }, order: [['blockTimeUnixMs', 'DESC']], }) )?.block ?? - // Use first block with a time set if no event exists before start time. + // Use first block if no event exists before start time. ( await WasmStateEvent.findOne({ where: { @@ -386,6 +388,7 @@ export const computer: Router.Middleware = async (ctx) => { await WasmStateEvent.findOne({ where: { blockTimeUnixMs: { + [Op.gt]: 0, [Op.lte]: times[1], }, },