diff --git a/src/services/evm/erc20.service.ts b/src/services/evm/erc20.service.ts index 25a0194eb..ab167f404 100644 --- a/src/services/evm/erc20.service.ts +++ b/src/services/evm/erc20.service.ts @@ -387,8 +387,8 @@ export default class Erc20Service extends BullableService { .first() .throwIfNotFound() ).time; - const lastUpdatedDate = (await Erc20Statistic.query().max('date').first()) - ?.max; + const lastUpdatedRecord = await Erc20Statistic.query().max('date').first(); + const lastUpdatedDate = lastUpdatedRecord?.max; if (lastUpdatedDate) { systemDate.setHours(0, 0, 0, 0); lastUpdatedDate.setHours(0, 0, 0, 0);