Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A user reported MetaMask/metamask-mobile#1777 for which I patched with MetaMask/metamask-mobile#1787 but after giving it some further thought I realised it would probably make more sense to add this to
controllers
so we can share this across products (making this the single source of truth for both the extension and mobile).TLDR; this will effectively replace: https://github.com/MetaMask/metamask-mobile/blob/master/app/util/infura-conversion.json (on mobile) and https://github.com/MetaMask/metamask-extension/blob/develop/ui/app/helpers/constants/available-conversions.json (on the extension).
I'm going to open a corresponding PR in mobile that will work with this (once it's merged and published)that's done now, the mobile PR changes to consume this are open here: MetaMask/metamask-mobile#1792
if it makes sense I can also open one on the extension so we're using this for conversions in both.
I'm also not entirely satisfied with this structure and open to suggestions. this might be a little weird because it doesn't really follow the "controllers" conversion we're using?
it would also probably make sense to add a couple tests verifying some of the more important currencies are here (I was surprised to discover we were missing SAI on mobile)I added this and now I am contemplating if it's of value 🤔
/cc @whymarrh @Gudahtt @estebanmino