diff --git a/src/lib/token_list_gen.ts b/src/lib/token_list_gen.ts index cc72f8a6..43c3d5e7 100644 --- a/src/lib/token_list_gen.ts +++ b/src/lib/token_list_gen.ts @@ -324,7 +324,7 @@ export const generateTokenList = async ( name: options && options.preserveListName ? name - : listNameToArbifiedListName(name), + : listNameToArbifiedListName(name, l2.network.chainID), timestamp: new Date().toISOString(), version, tokens: arbifiedTokenList, diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 18bcd926..7872d319 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -49,14 +49,19 @@ for (const address of Object.keys(logoUris)) { logoUris[address.toLowerCase()] = logoUris[address]; } -export const listNameToArbifiedListName = (name: string) => { +export const listNameToArbifiedListName = ( + name: string, + childChainId: number, +) => { const prefix = 'Arbed '; let fileName = sanitizeNameString(name); if (!fileName.startsWith(prefix)) { fileName = prefix + fileName; } - return fileName.split(' ').slice(0, 2).join(' ').slice(0, 20); + + const baseName = fileName.split(' ').slice(0, 2).join(' ').slice(0, 20); + return `${baseName} ${childChainId}`; }; export const getL1TokenAndL2Gateway = async (