Skip to content

Conversation

@chrstph-dvx
Copy link
Contributor

@chrstph-dvx chrstph-dvx commented Oct 14, 2025

This PR is part of a stack created with Aviator.

Summary

Steps to test

@vercel
Copy link

vercel bot commented Oct 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
arbitrum-portal Ready Ready Preview Oct 24, 2025 3:02pm

@chrstph-dvx chrstph-dvx marked this pull request as draft October 15, 2025 16:12
@chrstph-dvx chrstph-dvx changed the title feat(bridge): add token lists for lifi WIP: feat(bridge): add token lists for lifi Oct 15, 2025
@chrstph-dvx chrstph-dvx force-pushed the lifi/01-add-token-lists branch 2 times, most recently from 799658e to 125ef54 Compare October 21, 2025 14:48
"css:build:all": "yarn css:build && yarn workspace arb-token-bridge-ui css:build && yarn workspace portal css:build",
"css:watch:all": "yarn css:watch && yarn workspace arb-token-bridge-ui css:watch && yarn workspace portal css:watch"
"css:watch:all": "yarn css:watch && yarn workspace arb-token-bridge-ui css:watch && yarn workspace portal css:watch",
"test": "vitest --config vitest.config.ts --watch",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In later PR, we will need to run those tests in CI


const BASE_TOKEN_LIST = {
name: TOKEN_LIST_NAME,
timestamp: STATIC_TIMESTAMP,
Copy link
Member

Choose a reason for hiding this comment

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

is this fixed timestamp intentional so that we update it only when we have a token list version bump?

Copy link
Member

Choose a reason for hiding this comment

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

Can you please add native USDC on Ethereum, native USDC on Arb One, and wrapped USDC.e on Arb One as test cases?

},
},
);
} catch (error: any) {
Copy link
Member

Choose a reason for hiding this comment

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

unknown would be a better type here as it's explicitly asserted

Comment on lines +38 to +96
if (parentChainId === null || childChainId === null) {
return NextResponse.json(
{
...BASE_TOKEN_LIST,
tokens: [],
},
{
status: 400,
headers: {
'Cache-Control': 'public, max-age=60, s-maxage=60',
},
},
);
}

if (!allowedLifiSourceChainIds.includes(parentChainId)) {
return NextResponse.json(
{
...BASE_TOKEN_LIST,
tokens: [],
},
{
status: 400,
headers: {
'Cache-Control': 'public, max-age=60, s-maxage=60',
},
},
);
}

if (!allowedLifiDestinationChainIds.includes(childChainId)) {
return NextResponse.json(
{
...BASE_TOKEN_LIST,
tokens: [],
},
{
status: 400,
headers: {
'Cache-Control': 'public, max-age=60, s-maxage=60',
},
},
);
}

if (!lifiDestinationChainIds[parentChainId]?.includes(childChainId)) {
return NextResponse.json(
{
...BASE_TOKEN_LIST,
tokens: [],
},
{
status: 400,
headers: {
'Cache-Control': 'public, max-age=60, s-maxage=60',
},
},
);
}
Copy link
Member

Choose a reason for hiding this comment

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

are these conditions going to have different responses with the tokens: [] eventually? otherwise would be better to combine the conditions into a bracket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants