Skip to content

Commit

Permalink
api2: return metadata used by frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Mar 5, 2025
1 parent 1e02b0a commit 3dc9827
Show file tree
Hide file tree
Showing 6 changed files with 425 additions and 5 deletions.
1 change: 1 addition & 0 deletions defi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"api2-cron-task": "npx ts-node --logError --transpile-only src/api2/cron-task/index.ts",
"run-governance": "npx ts-node --logError --transpile-only src/governance/test.ts",
"cron-dimensions": "export AWS_REGION='eu-central-1' && export tableName='prod-table' && npx --node-options='--max-old-space-size=20144' ts-node --logError --transpile-only src/api2/cron-task/dimensions.ts",
"cron-raises": "npx ts-node --logError --transpile-only src/api2/cron-task/raises.ts",
"extension-updateExtensionTwitterConfig": "export AWS_REGION='eu-central-1' && npx ts-node --logError --transpile-only src/api2/scripts/updateExtensionTwitterConfig.ts",
"dimensions-store-all": "npx --node-options='--max-old-space-size=30144' ts-node --logError --transpile-only src/adaptors/handlers/storeAdaptorData/storeAll.ts 2>&1 | tee dimensionsRun.log; node src/api2/scripts/printDimensionRunStats.js 2>&1 | tee dimensionsRunStats2.log",
"fillOld-dimensions": "npx ts-node --logError --transpile-only src/adaptors/handlers/storeAdaptorData/refillScript.ts",
Expand Down
1 change: 0 additions & 1 deletion defi/src/adaptors/utils/getAllChainsFromAdaptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export const normalizeDimensionChainsMap = {
'immutable x': CHAIN.IMMUTABLEX,
'bitlayer': CHAIN.BITLAYER,
'rootstock': CHAIN.ROOTSTOCK,
'lightlink': CHAIN.LIGHTLINK_PHOENIX
} as IJSON<CHAIN>

export const formatChainKey = (chain: string) => {
Expand Down
2 changes: 1 addition & 1 deletion defi/src/api2/cache/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const cache: {
const MINUTES = 60 * 1000
const HOUR = 60 * MINUTES

export async function initCache({ cacheType = RUN_TYPE.CRON } = { cacheType: RUN_TYPE.API_SERVER }) {
export async function initCache({ cacheType = RUN_TYPE.API_SERVER }: { cacheType?: string } = { cacheType: RUN_TYPE.API_SERVER }) {
console.time('Cache initialized: ' + cacheType)
await updateMetadata()
if (cacheType === RUN_TYPE.API_SERVER) {
Expand Down
Loading

0 comments on commit 3dc9827

Please sign in to comment.