Skip to content

Commit

Permalink
feat: default token for each chain (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
yqrashawn authored Oct 9, 2023
1 parent f9d0856 commit 0785843
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
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

0 comments on commit 0785843

Please sign in to comment.