-
Notifications
You must be signed in to change notification settings - Fork 65
fix: include Across supported tokens in /swap/tokens endpoint #1927
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
fix: include Across supported tokens in /swap/tokens endpoint #1927
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
api/swap/tokens/index.ts
Outdated
| ? constants.AddressZero | ||
| : route.fromTokenAddress; | ||
|
|
||
| const tokenKey = `${route.fromChain}-${route.fromTokenSymbol}-${tokenAddress.toLowerCase()}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay to only look at route.fromTokenSymbol? Would we miss some tokens which are only defined as destination tokens like USDC.e, USDbC, etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call! The only token that matched this condition right now was USDbC on Base, which was already included since it’s part of third party lists. Still, to make this more future-proof, I’ve added those here: 873d726
gsteenkamp89
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
NikolasHaimerl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for implementing the price lookup :)
This PR includes Across supported tokens in the response of /swap/tokens endpoint.
These are the new tokens that will be part of the response with the current enabled routes: