Skip to content

Commit

Permalink
fix: move deprecation date
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeday committed Jul 10, 2024
1 parent b54fb25 commit 861d3d8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
7 changes: 6 additions & 1 deletion consts/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ export const ETHPLORER_TOKEN_ENDPOINT =

export const HEALTHY_RPC_SERVICES_ARE_OVER = 'Healthy RPC services are over!';

// 5rd August, Monday, middle of the working day
// 5th August, Monday, middle of the working day
export const API_DEFAULT_SUNSET_TIMESTAMP = new Date(
'2024-08-05T09:00:00',
).getTime();

// 9th September, Monday, middle of the working day
export const API_LATER_SUNSET_TIMESTAMP = new Date(
'2024-09-09T09:00:00',
).getTime();

export const enum API_ROUTES {
ETH_APR = 'api/eth-apr',
ETH_PRICE = 'api/eth-price',
Expand Down
4 changes: 2 additions & 2 deletions pages/api/eth-price.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {

import { config } from 'config';
import {
API_DEFAULT_SUNSET_TIMESTAMP,
API_LATER_SUNSET_TIMESTAMP,
API_ROUTES,
ETH_API_ROUTES,
getReplacementLink,
Expand All @@ -28,7 +28,7 @@ export default wrapNextRequest([
responseTimeMetric(Metrics.request.apiTimings, API_ROUTES.ETH_PRICE),
cacheControl({ headers: config.CACHE_ETH_PRICE_HEADERS }),
sunsetBy({
sunsetTimestamp: API_DEFAULT_SUNSET_TIMESTAMP,
sunsetTimestamp: API_LATER_SUNSET_TIMESTAMP,
replacementLink: getReplacementLink(API_ROUTES.ETH_PRICE),
}),
defaultErrorHandler,
Expand Down
4 changes: 2 additions & 2 deletions pages/api/oneinch-rate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { wrapRequest as wrapNextRequest } from '@lidofinance/next-api-wrapper';

import { config } from 'config';
import {
API_DEFAULT_SUNSET_TIMESTAMP,
API_LATER_SUNSET_TIMESTAMP,
API_ROUTES,
ETH_API_ROUTES,
getReplacementLink,
Expand All @@ -25,7 +25,7 @@ export default wrapNextRequest([
rateLimit,
responseTimeMetric(Metrics.request.apiTimings, API_ROUTES.ONEINCH_RATE),
sunsetBy({
sunsetTimestamp: API_DEFAULT_SUNSET_TIMESTAMP,
sunsetTimestamp: API_LATER_SUNSET_TIMESTAMP,
replacementLink: getReplacementLink(API_ROUTES.ONEINCH_RATE),
}),
...errorAndCacheDefaultWrappers,
Expand Down
4 changes: 2 additions & 2 deletions pages/api/short-lido-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { wrapRequest as wrapNextRequest } from '@lidofinance/next-api-wrapper';

import { config } from 'config';
import {
API_DEFAULT_SUNSET_TIMESTAMP,
API_LATER_SUNSET_TIMESTAMP,
API_ROUTES,
ETH_API_ROUTES,
getReplacementLink,
Expand All @@ -26,7 +26,7 @@ export default wrapNextRequest([
rateLimit,
responseTimeMetric(Metrics.request.apiTimings, API_ROUTES.SHORT_LIDO_STATS),
sunsetBy({
sunsetTimestamp: API_DEFAULT_SUNSET_TIMESTAMP,
sunsetTimestamp: API_LATER_SUNSET_TIMESTAMP,
replacementLink: getReplacementLink(API_ROUTES.SHORT_LIDO_STATS),
}),
...errorAndCacheDefaultWrappers,
Expand Down
4 changes: 2 additions & 2 deletions pages/api/totalsupply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {

import { config } from 'config';
import {
API_DEFAULT_SUNSET_TIMESTAMP,
API_LATER_SUNSET_TIMESTAMP,
API_ROUTES,
ETH_API_ROUTES,
getReplacementLink,
Expand All @@ -27,7 +27,7 @@ export default wrapNextRequest([
responseTimeMetric(Metrics.request.apiTimings, API_ROUTES.TOTALSUPPLY),
cacheControl({ headers: config.CACHE_TOTAL_SUPPLY_HEADERS }),
sunsetBy({
sunsetTimestamp: API_DEFAULT_SUNSET_TIMESTAMP,
sunsetTimestamp: API_LATER_SUNSET_TIMESTAMP,
replacementLink: getReplacementLink(API_ROUTES.TOTALSUPPLY),
}),
defaultErrorHandler,
Expand Down

0 comments on commit 861d3d8

Please sign in to comment.