chainlist icon indicating copy to clipboard operation
chainlist copied to clipboard

`/api/` endpoints broken for about a week

Open polds opened this issue 10 months ago • 1 comments

Around 4 days ago this commit https://github.com/DefiLlama/chainlist/commit/565174c82cf054eead906260391461c6d41cf226#diff-3f946e9c5c04b8c250f4f63d6b12f6f442dac5a91c254a1217d33e13805db76cR27 added a reference to chainTvls, and I see there was a partial revert later, but the reference still remains. When running npm run dev and hitting something like /api/chain/1 I see this error:

error - pages/api/chain/[chain].js (22:33) @ chainTvls
error - ReferenceError: chainTvls is not defined
    at handler (webpack-internal:///(api)/./pages/api/chain/[chain].js:22:84)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.apiResolver (/Users/peter/workplace/github.com/DefiLlama/chainlist/node_modules/next/dist/server/api-utils/node.js:363:9)
    at async DevServer.runApi (/Users/peter/workplace/github.com/DefiLlama/chainlist/node_modules/next/dist/server/next-server.js:474:9)
    at async Object.fn (/Users/peter/workplace/github.com/DefiLlama/chainlist/node_modules/next/dist/server/next-server.js:736:37)
    at async Router.execute (/Users/peter/workplace/github.com/DefiLlama/chainlist/node_modules/next/dist/server/router.js:252:36)
    at async DevServer.run (/Users/peter/workplace/github.com/DefiLlama/chainlist/node_modules/next/dist/server/base-server.js:383:29)
    at async DevServer.run (/Users/peter/workplace/github.com/DefiLlama/chainlist/node_modules/next/dist/server/dev/next-dev-server.js:734:20)
    at async DevServer.handleRequest (/Users/peter/workplace/github.com/DefiLlama/chainlist/node_modules/next/dist/server/base-server.js:321:20) {
  page: '/api/chain/[chain]'
}
  20 |     }
  21 | 
> 22 |     chain = populateChain(chain, chainTvls);
     |                                 ^
  23 | 
  24 |     const llamaNodesRpc = llamaNodesRpcs[chain.chainId] ?? null;
  25 | 

polds avatar Dec 13 '24 21:12 polds