-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: add whitelist tokens #13
Conversation
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.
Looks good!
CELO: "celo" as CoingeckoTokenId, | ||
CUSD: "celo-dollar" as CoingeckoTokenId, | ||
AVAX: "avalanche-2" as CoingeckoTokenId, | ||
MTK: undefined, |
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.
why we have undefined here instead of not having it ?
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.
not strictly needed, it was for clarity (mainly for me when checking at Coingecko)
42: "lukso-token" as CoingeckoTokenId, | ||
42220: "celo" as CoingeckoTokenId, | ||
1088: "metis-token" as CoingeckoTokenId, | ||
const TokenMapping: { [key: string]: CoingeckoTokenId | undefined } = { |
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.
should we add a type for keys ?
Could happen that is not supported in coingecko but in cmc , is that we want that flexibility on the key type?
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.
the flexibility is because with TokenCode
as type, i would have to write:
["USDC" as TokenCode]: "usd-coin" as CoingeckoTokenId,
which seems too much, i think this is an issue of using Brand Types as type of object's keys
i thought of a Union type too 🤔 don't know if it'll add any benefit here
🤖 Linear
Closes GIT-111 GIT-66
Description
PricingProvider
interface to useTokenCode
in place of (addreess, chainId)TokenCode
toCoingeckoID
PoolCreatedHandler
to fetch Token given the Chain and TokenAddress from EventChecklist before requesting a review