diff --git a/backend/src/api/mining.ts b/backend/src/api/mining.ts index 8d11abfa7..7e7008351 100644 --- a/backend/src/api/mining.ts +++ b/backend/src/api/mining.ts @@ -89,7 +89,6 @@ class Mining { }); poolsStatistics['pools'] = poolsStats; - poolsStatistics['oldestIndexedBlockTimestamp'] = await BlocksRepository.$oldestBlockTimestamp(); const blockCount: number = await BlocksRepository.$blockCount(null, interval); poolsStatistics['blockCount'] = blockCount; diff --git a/backend/src/routes.ts b/backend/src/routes.ts index fa298cc22..ef8dd47e5 100644 --- a/backend/src/routes.ts +++ b/backend/src/routes.ts @@ -669,14 +669,12 @@ class Routes { public async $getHistoricalBlockFeeRates(req: Request, res: Response) { try { const blockFeeRates = await mining.$getHistoricalBlockFeeRates(req.params.interval); - const oldestIndexedBlockTimestamp = await BlocksRepository.$oldestBlockTimestamp(); + const blockCount = await BlocksRepository.$blockCount(null, null); res.header('Pragma', 'public'); res.header('Cache-control', 'public'); + res.header('X-total-count', blockCount.toString()); res.setHeader('Expires', new Date(Date.now() + 1000 * 60).toUTCString()); - res.json({ - oldestIndexedBlockTimestamp: oldestIndexedBlockTimestamp, - blockFeeRates: blockFeeRates, - }); + res.json(blockFeeRates); } catch (e) { res.status(500).send(e instanceof Error ? e.message : e); } diff --git a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html index ec3773ca8..016c80936 100644 --- a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html +++ b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.html @@ -8,34 +8,34 @@