From cc6432bbd4200662942cbe8bfbbe9c7cde16c96b Mon Sep 17 00:00:00 2001 From: yqrashawn Date: Mon, 9 Oct 2023 11:09:08 +0800 Subject: [PATCH] feat: default token for each chain --- src/defaultTokens.mjs | 4 ++++ src/generate.mjs | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/defaultTokens.mjs b/src/defaultTokens.mjs index 37ba6ef..76e94c5 100644 --- a/src/defaultTokens.mjs +++ b/src/defaultTokens.mjs @@ -14,3 +14,7 @@ export const defaultTokenDataFolders = new Set([ 'UNI', 'CRV', ]) + +export const defaultTokenDataFoldersEachChain = { + sepolia: new Set(['GHO']), +} diff --git a/src/generate.mjs b/src/generate.mjs index b09d1e6..5fb692c 100644 --- a/src/generate.mjs +++ b/src/generate.mjs @@ -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 @@ -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, }, }