Skip to content
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

feat: add new chains for fiat onramp #7476

Merged
merged 56 commits into from
Aug 17, 2023

Conversation

ChefBingbong
Copy link
Contributor

@ChefBingbong ChefBingbong commented Aug 2, 2023

🤖 Generated by Copilot at 3b2b83f

Summary

🌐💵♻️

The pull request enhances the buy crypto feature by adding support for more chains and tokens, refactoring the code to use a common supportedTokenMap object, and improving the default amount calculation for fiat currencies. It affects the files FiatOnRampModal.tsx, hooks.ts, constants.ts, and BuyCryptoForm.tsx in the apps/web/src directory.

Buy crypto feature
SUPPORTED_CHAINS expands
Winter of scaling

Walkthrough

  • Enable buy crypto feature for more chains and tokens by adding ChainId.ZKSYNC and ChainId.ARBITRUM_ONE to SUPPORTED_CHAINS array and restructuring supported tokens for each on-ramp provider into separate arrays and a supportedTokenMap object in constants.ts (link)
  • Use supportedTokenMap object to dynamically pass the supported tokens for each chain to the fetchMoonPaySignedUrl and fetchMercuryoSignedUrl functions in FiatOnRampModal.tsx (link, link)
  • Update the typedValue parameter for the replaceBuyCryptoState action in hooks.ts and the onFieldAInput function call in BuyCryptoForm.tsx to use the modified calculateDefaultAmount function with the fiat currency code parsed from the URL or the base currency (link, link)
  • Import ChainId and Box components from @pancakeswap/sdk and @pancakeswap/uikit packages respectively in FiatOnRampModal.tsx to use the ChainId enum for identifying different chains and the Box component for styling the modal (link)
  • Reorder and remove some unused imports in FiatOnRampModal.tsx to improve the readability and maintainability of the code (link)

@changeset-bot
Copy link

changeset-bot bot commented Aug 2, 2023

⚠️ No Changeset found

Latest commit: bdfd247

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Aug 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 17, 2023 9:28am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
aptos-web ⬜️ Ignored (Inspect) Visit Preview Aug 17, 2023 9:28am
blog ⬜️ Ignored (Inspect) Visit Preview Aug 17, 2023 9:28am
bridge ⬜️ Ignored (Inspect) Visit Preview Aug 17, 2023 9:28am
uikit ⬜️ Ignored (Inspect) Visit Preview Aug 17, 2023 9:28am

@ChefMomota
Copy link
Contributor

Remember move AUD.svg to public/images/currencies folder

@ChefBingbong
Copy link
Contributor Author

Remember move AUD.svg to public/images/currencies folder

done

@ChefBingbong ChefBingbong changed the title Feat add new chains for fiat onramp feat: add new chains for fiat onramp Aug 2, 2023
@ChefMomota
Copy link
Contributor

Fix the eslint

@ChefMomota ChefMomota closed this Aug 3, 2023
@ChefMomota ChefMomota reopened this Aug 3, 2023
@ChefBingbong
Copy link
Contributor Author

Fix the eslint

on it now

@ChefBingbong ChefBingbong merged commit 358994e into develop Aug 17, 2023
11 checks passed
@ChefBingbong ChefBingbong deleted the feat--add-new-chains-for-fiat-onramp branch August 17, 2023 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants