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: fiat on ramp integration #7065

Merged
merged 104 commits into from
Jun 22, 2023
Merged

Conversation

ChefBingbong
Copy link
Contributor

@ChefBingbong ChefBingbong commented Jun 6, 2023

🤖 Generated by Copilot at b678f86

Summary

🌐💳🛒
Still under progress. have few more things to do. should have done in next couple of days

The code added new features and components to the web app to enable users to buy crypto with fiat currencies or on-ramp tokens, using the Moonpay and Mercuryo services. The code also updated the CurrencyInputPanel, CurrencyLogo, CurrencyList, and CurrencySearch components to support the buy crypto flow, and removed some unused dependencies and configurations. The code also added some environment variables, API routes, hooks, and token lists to support the integration with the swap-sdk-core package and the on-ramp services.

To buy crypto with fiat, they say
You need Moonpay or Mercuryo, eh?
With FiatOnRampModal and CurrencySearch
And some hooks and routes for the API to fetch
You can swap your cash for tokens today

Walkthrough

  • Add environment variables for Moonpay API integration (link)
  • Add webpack rule to use @svgr/webpack loader for SVG files (link)
  • Add and remove dependencies in package.json (link, link, link, link, link)
  • Add styled component CryptoCard with custom styles (link)
  • Add useRouter hook and pathname-based conditions to CurrencyInputPanel component (link, link, link, link, link, link, link)
  • Add FiatOnRampModal component with Moonpay widget iframe and availability button (link)
  • Add MercuryoOnrampModal component with Mercuryo widget div and button (link)
  • Add condition to render fiat currency logo in CurrencyLogo component (link, link)
  • Add 'Buy Crypto' menu item to config file (link, link, link, link, link)
  • Add onRampFlow prop and pathname-based conditions to CurrencyList component (link, link, link, link, link, link, link, link, link, link, link)
  • Add mode prop and tokenList variable to CurrencySearch component (link, link, link, link, link)
  • Add mode prop and onRampFlow flag to CurrencySearchModal component (link, link, link, link, link, link)
  • Add list of supported on-ramp tokens to pancake-supported-onramp-currency-list.json file (link)
  • Add hooks and functions to get on-ramp tokens and fiat currencies from active list URLs (link, link, link, link, link, link, link)
  • Add hook to check Moonpay service availability based on user's IP address (link)
  • Add Script component to inject Mercuryo widget script in document body (link, link)
  • Add API route to sign Moonpay URL with query parameters and secret key (link)
  • Add API route to get user's country and countryCode from IP address (link)

@changeset-bot
Copy link

changeset-bot bot commented Jun 6, 2023

⚠️ No Changeset found

Latest commit: f9ef8af

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 Jun 6, 2023

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

Name Status Preview Comments Updated (UTC)
aptos-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2023 2:43pm
blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2023 2:43pm
bridge ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2023 2:43pm
uikit ❌ Failed (Inspect) Jun 22, 2023 2:43pm
web ✅ Ready (Inspect) Visit Preview 💬 4 unresolved
✅ 2 resolved
Jun 22, 2023 2:43pm

@ChefBingbong ChefBingbong marked this pull request as draft June 6, 2023 02:46
@ChefBingbong ChefBingbong changed the title Feat fiat on ramp integration feat: fiat on ramp integration Jun 6, 2023
apps/web/.env Outdated Show resolved Hide resolved
apps/web/next.config.mjs Outdated Show resolved Hide resolved
chefilip added 2 commits June 22, 2023 21:22
…ap/pancake-frontend into feat--fiat-on-ramp-integration
@chefilip chefilip merged commit df6f0cb into develop Jun 22, 2023
@chefilip chefilip deleted the feat--fiat-on-ramp-integration branch June 22, 2023 14:43
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.

5 participants