Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: default token for each chain #81

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/defaultTokens.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ export const defaultTokenDataFolders = new Set([
'UNI',
'CRV',
])

export const defaultTokenDataFoldersEachChain = {
sepolia: new Set(['GHO']),
}
13 changes: 9 additions & 4 deletions src/generate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { glob } from 'glob'

import packageJson from '../package.json' assert { type: 'json' }
import { NETWORK_DATA } from './chains.mjs'
import { defaultTokenDataFolders } from './defaultTokens.mjs'
import {
defaultTokenDataFolders,
defaultTokenDataFoldersEachChain,
} from './defaultTokens.mjs'

const version = packageJson.version

Expand Down Expand Up @@ -39,9 +42,11 @@ export function generate() {
logoURI: `${BASE_URL}/data/${folder}/logo.${logoext}`,
extensions: {
// ...bridges,
scrollListId: defaultTokenDataFolders.has(folder)
? 'default'
: 'extended',
scrollListId:
defaultTokenDataFolders.has(folder) ||
defaultTokenDataFoldersEachChain[chain]?.has(folder)
? 'default'
: 'extended',
scrollTokenId: folder,
},
}
Expand Down