metamask-extension
metamask-extension copied to clipboard
Ability to buy tokens with Moonpay
Explanation
This extends this already merged PR: https://github.com/MetaMask/metamask-extension/pull/15551 and adds Moonpay as an extra onramp provider
Current State: Only native currencies can be bought through Moonpay using the buy button After Change: Ability to purchase tokens defined in BUYABLE_CHAINS_MAP using Moonpay
More Information
See ONRAMP-189 and ONRAMP-190
Screenshots/Screencaps
Before

After

Manual Testing Steps
These changes apply only to Ethereum mainnet
Import a token If token is on the Moonpay lists it should display a "Buy" button
Moonpay lists:
Mainnet BSC: Polygon Avalanche C-Chain Celo
Depending on which list it shows, it should give you the option to buy the token on Moonpay Once you click on the provider's "Continue to" button, a window on said provider should open, and the token to buy should already be preselected
Pre-Merge Checklist
- [x] PR template is filled out
- [ ] IF this PR fixes a bug, a test that would have caught the bug has been added
- [ ] PR is linked to the appropriate GitHub issue
- [ ] PR has been added to the appropriate release Milestone
+ If there are functional changes:
- [ ] Manual testing complete & passed
- [ ] "Extension QA Board" label has been applied
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.
@brad-decker tagging you here since you also went through the previous PR and you are already familiar with these changes
@nikoferro did this pass locally for you? I have a feeling that the "type is too complex" issue will come back here due to how long supported currencies list is.
@brad-decker yes, worked fine on my end, and seems to be passing tests now. had to do a couple of changes on how we handle supported currencies for moonpay.
i.e: triple checked and symbols are not actually required to be lowercase
Looks like junit test results got commited somehow
Looks like junit test results got commited somehow
@brad-decker yeah i noticed that file, but since it wasn't on the gitignore, i understood that it was intended to be included (maybe just for an extra check, idk)
removed the results and added test-results/
to the gitignore as i get from your comment that this was not intended to be included