Accommodate for 0 sources verifying swap token#10521
Accommodate for 0 sources verifying swap token#10521darkwing merged 2 commits intoMetaMask:developfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
5f16a25 to
1719596
Compare
1719596 to
18e0e62
Compare
de60ab1
| selectedToToken?.address && | ||
| selectedToToken?.address !== ETH_SWAPS_TOKEN_OBJECT.address; | ||
|
|
||
| const occurances = Number(selectedToToken?.occurances || 0); |
There was a problem hiding this comment.
Made this small change. NaN < 2 is false, so we need to have 0 as fallback.
There was a problem hiding this comment.
It seems a bit inappropriate to show this message before the user has selected anything though 🤔
There was a problem hiding this comment.
Oh I see - because toTokenIsNotEth evaluates to false in that case.
Nevermind, this all makes sense. I thought it worked differently from reading the code at first.
|
Tbh if we're just going to link to Etherscan as "how to verify", we should just draw verifications from them directly. Might be better to just say "View on block explorer", as a way to suggest the user verifies themselves, instead of implying that presence on etherscan is equal to total verification? |

Fixes this issue:
I've provided a custom message for this rare case.