Skip to content

Conversation

creed-victor
Copy link
Contributor

@creed-victor creed-victor self-assigned this Oct 16, 2025
@Copilot Copilot AI review requested due to automatic review settings October 16, 2025 12:14
@creed-victor creed-victor added the enhancement New feature or request label Oct 16, 2025
Copy link

netlify bot commented Oct 16, 2025

Deploy Preview for sovryn-layer ready!

Name Link
🔨 Latest commit 93a46d9
🔍 Latest deploy log https://app.netlify.com/projects/sovryn-layer/deploys/68f0e1a3349c860008b0895a
😎 Deploy Preview https://deploy-preview-9--sovryn-layer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Switches token data sourcing from the old token-list repository to the new slayer-data repository and updates expected JSON structure. Key changes:

  • Introduces ENV.DATA_BASE_URL and removes hardcoded GIT_TOKEN_LIST_URL constant.
  • Adjusts token fetching logic to use new URL pattern and expects a wrapped items array in the JSON.
  • Adds bob-sepolia chain config and alters the list of chain IDs fetched (Rootstock testnet 31 commented out, bob-sepolia 808813 added).

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
apps/indexer/src/workers/ingest/sources/tokens/token-fetcher.ts Points to new data base URL, changes JSON parsing, modifies fetched chain IDs.
apps/indexer/src/env.ts Adds DATA_BASE_URL environment variable (with default) using envalid url validator.
apps/indexer/src/configs/chains.ts Adds bob-sepolia chain configuration entry.
Comments suppressed due to low confidence (1)

apps/indexer/src/workers/ingest/sources/tokens/token-fetcher.ts:1

  • ChainId 31 (Rootstock Testnet) remains defined in configs/chains.ts but is now excluded from token fetching by commenting it out here, creating an inconsistency that will prevent tokens for that configured chain from being ingested. Either restore 31 in this array or remove/flag the chain configuration entry if intentional.
import { and, eq, inArray, sql } from 'drizzle-orm';

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

return await response.json().then((data) =>
uniqBy(
(data as TokenData[]).map((item) => ({
(data as { items: TokenData[] }).items.map((item) => ({
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assumes the fetched JSON always has an items array; if the structure differs or items is missing/null, .items.map will throw. Safely access with a runtime check (e.g., const items = Array.isArray((data as any).items) ? (data as any).items : [];).

Suggested change
(data as { items: TokenData[] }).items.map((item) => ({
(Array.isArray((data as any).items) ? (data as any).items : []).map((item: TokenData) => ({

Copilot uses AI. Check for mistakes.

@grinry grinry merged commit 22f393b into develop Oct 20, 2025
5 checks passed
@grinry grinry deleted the feat/SOV-5195-indexer-preparation branch October 20, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants