-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
|
Remember move |
done |
Fix the eslint |
on it now |
🤖 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 filesFiatOnRampModal.tsx
,hooks.ts
,constants.ts
, andBuyCryptoForm.tsx
in theapps/web/src
directory.Walkthrough
ChainId.ZKSYNC
andChainId.ARBITRUM_ONE
toSUPPORTED_CHAINS
array and restructuring supported tokens for each on-ramp provider into separate arrays and asupportedTokenMap
object inconstants.ts
(link)supportedTokenMap
object to dynamically pass the supported tokens for each chain to thefetchMoonPaySignedUrl
andfetchMercuryoSignedUrl
functions inFiatOnRampModal.tsx
(link, link)typedValue
parameter for thereplaceBuyCryptoState
action inhooks.ts
and theonFieldAInput
function call inBuyCryptoForm.tsx
to use the modifiedcalculateDefaultAmount
function with the fiat currency code parsed from the URL or the base currency (link, link)ChainId
andBox
components from@pancakeswap/sdk
and@pancakeswap/uikit
packages respectively inFiatOnRampModal.tsx
to use theChainId
enum for identifying different chains and theBox
component for styling the modal (link)FiatOnRampModal.tsx
to improve the readability and maintainability of the code (link)