-
Notifications
You must be signed in to change notification settings - Fork 47
move buy to wallet #741
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
move buy to wallet #741
Conversation
🦋 Changeset detectedLatest commit: 2eee0c0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR centralizes the “Buy crypto” UI by moving the drawer component into the shared wallet package and updating all consumers to use it.
- Adds
BuyCryptoDrawer(and related types) topackages/wallet - Implements the new
BuyCryptoDrawercomponent and exports it - Refactors two apps to remove duplicate buy-drawer logic and wrap their UIs with the shared component
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/wallet/src/components/index.tsx | Exports the new BuyCryptoDrawer and its types |
| packages/wallet/src/components/buy-crypto-drawer/index.tsx | Introduces the standalone BuyCryptoDrawer component |
| apps/wallet/src/routes/portfolio/assets/-components/token.tsx | Replaces inline buy buttons with BuyCryptoDrawer |
| apps/portfolio/src/app/_components/buy-crypto-drawer.tsx | Wraps children in shared BuyCryptoDrawerBase |
| } else { | ||
| const providerUrls = { | ||
| mercuryo: `https://exchange.mercuryo.io/?type=buy&network=${network.id}¤cy=${currency.code}&address=${account.address}&hide_address=false&fix_address=true&widget_id=6a7eb330-2b09-49b7-8fd3-1c77cfb6cd47`, | ||
| moonpay: `https://buy.moonpay.com?apiKey=pk_live_YQC6CQPA5qqDu0unEwHJyAYQyeIqFGR`, |
Copilot
AI
Jul 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Moonpay URL is hardcoded without any dynamic query parameters. To ensure the correct network, currency, and recipient, include network=${network.id}, currency=${currency.code}, and address=${account.address} in the URL template.
| moonpay: `https://buy.moonpay.com?apiKey=pk_live_YQC6CQPA5qqDu0unEwHJyAYQyeIqFGR`, | |
| moonpay: `https://buy.moonpay.com?apiKey=pk_live_YQC6CQPA5qqDu0unEwHJyAYQyeIqFGR&network=${network.id}¤cy=${currency.code}&address=${account.address}`, |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
No description provided.