-
Notifications
You must be signed in to change notification settings - Fork 305
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: check UTL verifiedness of tokens before showing spoof warning banner #288
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
return legacyCdnTokenInfo | ||
? { | ||
...legacyCdnTokenInfo, | ||
verified: true, |
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.
@mcintyre94, I'm presuming that everything that comes from the legacy token list CDN can be presumed to be ‘verified.’ Does that make sense?
tags | ||
} | ||
tags, | ||
verified: !!(legacyCdnTokenInfo || sdkTokenInfo.verified), |
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.
This means ‘if you're on the legacy token list, or the UTL registry said you're verified, you're verified.’ Is that sound, @mcintyre94?
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.
Sorry, I missed this PR before! I think this is reasonable, but if the UTL registry contains the same token as unverified maybe that should take precedence?
So:
- Not on the legacy token list at all, UTL verified determines it
- On legacy token list and UTL, UTL verified determines it
- On legacy token list and not UTL, verified
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.
So, if I understand correctly, that basically implies that we should do this?
verified: !!(legacyCdnTokenInfo || sdkTokenInfo.verified), | |
verified: sdkTokenInfo.verified ?? false, |
- By this line, we know that
sdkTokenInfo
is non-null. - The ‘not on UTL but on legacy list’ case is handled above.
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.
Building a Vercel preview for that now: #289.
…nner # Summary The UTL provides a `verfied` property. Let's not show a token name/icon spoof warning banner unless that property is `false`. # Test Plan
This is a follow up on this comment: #288 (comment)
This is a follow up on this comment: #288 (comment) Reran the test plan from #288. Related to #229.
fix: check UTL verifiedness of tokens before showing spoof warning banner
Summary
The UTL provides a
verfied
property. Let's not show a token name/icon spoof warning banner unless that property isfalse
.Test Plan
http://localhost:3000/address/2VhjJ9WxaGC3EZFwJG9BDUs9KxKCAjQY4vgd1qxgYWVg/transfers
http://localhost:3000/address/DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263
http://localhost:3000/address/FASTAr1in6u53vykPbCuFTUZnGdiLJrXaTEQ7UAArdBm
Fixes: #229.