Feat: Multichain Deposits via Layerswap integration#303
Open
TomasDmArg wants to merge 9 commits intodevelopfrom
Open
Feat: Multichain Deposits via Layerswap integration#303TomasDmArg wants to merge 9 commits intodevelopfrom
TomasDmArg wants to merge 9 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an embedded Layerswap iframe widget to support multichain deposits into a Scroll-based ChatterPay wallet, including a standalone /deposit page for deep links with a prefilled destination address.
Changes:
- Introduces a reusable
LayerswapWidgetcomponent and integrates it into the dashboard Deposit modal. - Adds a standalone
/depositroute that validates?address=0x...and renders the Layerswap widget with a minimal header/layout. - Updates CSP to allow embedding Layerswap and adds new i18n strings for the deposit experience.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/sections/deposit/view/layerswap-widget.tsx | New Layerswap iframe widget component with URL-param configuration and optional embedded styling. |
| src/sections/deposit/view/deposit-view.tsx | New standalone deposit view that reads address from query params, validates it, and renders widget/error state + WhatsApp return link. |
| src/sections/deposit/view/index.ts | Barrel export for DepositView. |
| src/sections/banking/banking-balances.tsx | Reworks deposit dialog to embed Layerswap widget and adds a toggle to show the raw Scroll address + QR fallback view. |
| src/app/deposit/page.tsx | Adds /deposit page rendering DepositView (wrapped in Suspense). |
| src/app/deposit/layout.tsx | Adds deposit-specific layout with minimal header and main container spacing. |
| src/app/deposit/header.tsx | Adds minimal header (logo + language/theme controls) for /deposit. |
| src/routes/paths.ts | Adds paths.deposit. |
| src/config-global.ts | Adds LAYERSWAP_BG and LAYERSWAP_BASE_URL constants. |
| src/locales/langs/en.json | Adds layerswapDeposit strings and new deposit modal strings. |
| src/locales/langs/es.json | Adds layerswapDeposit strings and new deposit modal strings. |
| src/locales/langs/br.json | Adds layerswapDeposit strings and new deposit modal strings. |
| next.config.js | Allows layerswap.io in CSP frame-src and adjusts webpack config (fallback + externals). |
| src/layouts/common/notifications-modal.tsx | Formatting-only change (no functional impact). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ct in mobile for deposit page
Collaborator
|
@TomasDmArg : Temporarily deployed in dev for testing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #302
Problem
ChatterPay wallets currently live on Scroll, a single L2 network. Users who hold assets on other chains (Ethereum, Arbitrum, Optimism, Base, Solana, Bitcoin, Tron, etc.) have no straightforward way to fund their ChatterPay wallet without manually bridging through external tools, finding the right contract addresses, and hoping they pick the correct network. This friction discourages onboarding and limits the pool of potential depositors.
Solution
Integrate Layerswap as an embedded iframe widget that handles cross-chain bridging directly inside ChatterPay. Layerswap abstracts away network selection, wallet connection, and token routing:
The user simply picks a source and an amount, and funds arrive on Scroll USDT in their ChatterPay wallet.
Why Layerswap
Alternatives considered
How it works
Dashboard deposit modal
Standalone deposit page (
/deposit)/deposit?address=0x.... Note: This could happen when the user says "I'd like to deposit", "I'd like to see my wallet", "I'd like to create an account", "I'd like to see my balance"