-
Notifications
You must be signed in to change notification settings - Fork 212
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
Finance: MCD DAI migration #1048
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.
LGTM
} | ||
|
||
// On other networks, pretend any token with the same symbol is legit | ||
const mainnetEquivalent = ETHER_TOKEN_VERIFIED_BY_SYMBOL.get(tokenSymbol) |
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.
Couldn’t that be an (minor) issue for people testing an org on rinkeby with a symbol in the list? What about doing it the other way, by having a list of test tokens by network?
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.
Yes... we could add an extra check to make sure that the given token address is in the list of test tokens?
In that case, it would only be our test tokens that look "legit" with icons displayed in test networks.
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.
we could add an extra check to make sure that the given token address is in the list of test tokens?
Done in 70d65d4.
DAI_MAINNET_TOKEN_ADDRESS, | ||
{ symbol: 'DAI', name: 'Dai Stablecoin v1.0', decimals: '18' }, | ||
SAI_MAINNET_TOKEN_ADDRESS, | ||
{ symbol: 'SAI', name: 'Sai Stablecoin v1.0', decimals: '18' }, |
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 to see they fixed that in MCD DAI!
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.
Yes, thankfully. I still don't know how they got to that bytes32 abomination.
@@ -44,18 +46,18 @@ export const isTokenVerified = (tokenAddress, networkType) => | |||
? ETHER_TOKEN_VERIFIED_ADDRESSES.has(tokenAddress.toLowerCase()) | |||
: true | |||
|
|||
export const tokenDataFallback = (tokenAddress, fieldName, networkType) => { | |||
// The fallback list is without checksums | |||
export const tokenDataOverride = (tokenAddress, fieldName, networkType) => { |
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.
💯
c68359e
to
70d65d4
Compare
* Finance, Tokens: update verified tokens * Finance: upgrade to MCD DAI and use tokenIconUrl() for token icons * Finance: only show token icons on test networks for known test tokens
* Finance, Tokens: update verified tokens * Finance: upgrade to MCD DAI and use tokenIconUrl() for token icons * Finance: only show token icons on test networks for known test tokens
Based off #1045
tokenIconUrl()
while gracefully handling testnet tokens