✨ app: send funds to any network - #1292
Conversation
🦋 Changeset detectedLatest commit: f9ba0d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe mobile send flow was redesigned for asset-first selection, cross-chain routing, ENS and multi-chain receiver validation, amount entry, confirmation, and transaction status handling. Shared asset displays, translations, automation steps, and release metadata were updated. ChangesCross-chain send flow
Estimated code review effort: 5 (Critical) | ~120 minutes Merge Risk: 🟡 Moderate · up to The send flow still has a potential non-EVM crash and broken automation coverage, alongside several bounded UI regressions. These should be addressed or explicitly accepted before merge. Sequence Diagram(s)sequenceDiagram
participant Sender
participant Asset
participant Amount
participant Receiver
participant Confirm
participant LiFi
participant Wallet
Sender->>Asset: select digital asset and network
Asset->>Amount: open amount screen
Amount->>Receiver: pass amount and destination token
Receiver->>Confirm: submit validated receiver
Confirm->>LiFi: fetch route and fee data
Confirm->>Wallet: simulate and submit transfer
Wallet-->>Confirm: return transaction state
Confirm-->>Sender: show pending, success, or failure result
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/send-funds/SendFunds.tsx (1)
179-179: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRedirect
type=cryptoto the asset route.The app’s deep-link flow can navigate to
/send-funds?type=crypto, andSendFundsstill recognizes this type. The content condition excludes it, while the provider branch handles only"fiat", so the screen renders empty. Redirecttype === "crypto"to/send-funds/assetor restore the crypto content branch.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Team
Run ID: fce624f4-19e3-4928-931b-1ee4971872a4
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (47)
.changeset/bold-eagles-design.md.changeset/brave-pandas-listen.md.changeset/calm-deer-return.md.changeset/fresh-owls-divide.md.changeset/keen-swans-review.md.changeset/neat-crabs-paint.md.changeset/shiny-mice-speak.md.changeset/soft-lions-count.md.changeset/warm-bats-share.md.changeset/wise-moths-travel.md.maestro/subflows/send.yamlcspell.jsonpackage.jsonsrc/app/(main)/send-funds/_layout.tsxsrc/app/(main)/send-funds/confirm.tsxsrc/components/activity/Activity.tsxsrc/components/add-funds/Bridge.tsxsrc/components/home/AssetList.tsxsrc/components/home/ExternalAssets.tsxsrc/components/send-funds/Amount.tsxsrc/components/send-funds/Asset.tsxsrc/components/send-funds/Confirm.tsxsrc/components/send-funds/Contact.tsxsrc/components/send-funds/Contacts.tsxsrc/components/send-funds/NetworkFilter.tsxsrc/components/send-funds/PaySheet.tsxsrc/components/send-funds/QR.tsxsrc/components/send-funds/Receiver.tsxsrc/components/send-funds/RecentContacts.tsxsrc/components/send-funds/ReviewSheet.tsxsrc/components/send-funds/SendFunds.tsxsrc/components/send-funds/SwapSheet.tsxsrc/components/shared/AssetLogo.tsxsrc/components/shared/ChainLogo.tsxsrc/components/shared/SelectSheet.tsxsrc/components/shared/Text.tsxsrc/components/shared/TransactionDetails.tsxsrc/components/shared/UnsupportedNetworksSheet.tsxsrc/i18n/es-AR.jsonsrc/i18n/es.jsonsrc/i18n/pt.jsonsrc/utils/deployedOptions.tssrc/utils/ensOptions.tssrc/utils/executionOptions.tssrc/utils/lifi.tssrc/utils/queryClient.tssrc/utils/receiverSchema.ts
💤 Files with no reviewable changes (4)
- src/components/send-funds/RecentContacts.tsx
- src/components/send-funds/Contacts.tsx
- src/components/send-funds/Contact.tsx
- src/components/send-funds/ReviewSheet.tsx
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Team
Run ID: a5299863-b726-4ef5-8301-bf835f1fe556
📒 Files selected for processing (4)
.changeset/swift-otters-index.mdsrc/components/shared/AssetLogo.tsxsrc/components/swaps/SelectorModal.tsxsrc/utils/assetLogos.ts
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27fb05e553
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1292 +/- ##
==========================================
+ Coverage 73.40% 73.82% +0.41%
==========================================
Files 276 280 +4
Lines 13463 14299 +836
Branches 4711 5265 +554
==========================================
+ Hits 9883 10556 +673
- Misses 3241 3404 +163
Partials 339 339
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fec10f7cdb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Team
Run ID: 8c146abd-c433-46f0-8f55-d234e6755770
📒 Files selected for processing (8)
src/components/send-funds/Amount.tsxsrc/components/send-funds/Asset.tsxsrc/components/send-funds/Confirm.tsxsrc/components/send-funds/QR.tsxsrc/components/send-funds/Receiver.tsxsrc/components/shared/TransactionDetails.tsxsrc/utils/assetLogos.tssrc/utils/lifi.ts
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Team
Run ID: 5db2f0cd-7df5-4d41-8a6d-4638ca5dbb5d
📒 Files selected for processing (4)
src/components/send-funds/Amount.tsxsrc/components/send-funds/Confirm.tsxsrc/i18n/es.jsonsrc/i18n/pt.json
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13584fbb38
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76a111f75c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4718bd014
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Line 650 in 930b438
Remove this region marker and the matching markers around both token groups below. The repository explicitly prohibits region markers and all non-static-analysis comments, so these newly added organizational comments violate the applicable project convention.
AGENTS.md reference: AGENTS.md:L94-L96
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
💡 Codex Reviewexa/src/components/shared/TransactionDetails.tsx Lines 30 to 31 in af3718b When a held asset is sent directly from an Alchemy-supported chain that LI.FI does not return, this lookup leaves exa/src/components/send-funds/QR.tsx Line 107 in af3718b The new AGENTS.md reference: AGENTS.md:L115-L120 Lines 37 to 39 in af3718b This new critical-flow case mints EXA directly to the account and then asks ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c19056da76
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } | ||
| if (!destinationToken) return; | ||
| const family = correlate(destinationToken.symbol); | ||
| return candidates.find((item) => correlate(item.symbol) === family) ?? candidates[0]; |
There was a problem hiding this comment.
Skip unpriced assets during automatic pay selection
When the destination is selected first and an owned asset with a correlated symbol has a missing or zero price, this selects that asset before considering a priced fallback. The subsequent conversion makes fromAmount zero, leaving Continue disabled without an error even when another eligible priced asset could fund the send; choose a correlated candidate with a usable price or fall back to a priced candidate.
Useful? React with 👍 / 👎.
| const fromAmount = routed | ||
| ? payPrice > 0n | ||
| ? (usdAmount * 10n ** BigInt(payDecimals)) / payPrice | ||
| : 0n |
There was a problem hiding this comment.
Quote the entered destination amount exactly
For every routed send, this derives the source amount only from the two tokens' USD prices and then requests an exact-input quote. Because the quote applies the 0.25% integrator fee plus bridge or swap costs, entering 100 destination tokens can produce less than 100 tokens for the recipient even though that was the amount selected on this screen. Request an exact-output route using destinationAmount, or gross up the source amount so the quoted minimum preserves the entered transfer amount.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9ba0d3faa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| for (const { supportedChains } of bridges) { | ||
| for (const { fromChainId, toChainId } of supportedChains) { | ||
| origins.add(fromChainId); | ||
| if (fromChainId === (chain.id as ChainId)) destinations.add(toChainId); | ||
| } |
There was a problem hiding this comment.
Include destinations reachable from held source chains
When a user holds funds on an external chain, a destination reachable from that chain is omitted unless the home chain can also reach it, because destinations only collects pairs whose source is chain.id. Asset.tsx uses this set for its popular destination assets even though Amount.tsx permits deployed external assets as payment sources, so a valid route such as external chain A → destination B cannot be started when home → B is unsupported. Preserve source/destination pairs or include destinations reachable from eligible held origins.
Useful? React with 👍 / 👎.
| : action === undefined | ||
| ? recipient | ||
| : action === "transfer" | ||
| ? (new URLSearchParams(query).get("address") ?? "") |
There was a problem hiding this comment.
Reject payment QRs with mismatched token or amount
When scanning an EIP-681 ERC-20 request such as ethereum:<token>@<chain>/transfer?address=<recipient>&uint256=<amount>, this branch extracts only the recipient while the router retains the asset and amount selected before scanning. A token payment request can therefore proceed with a different token or amount unless the user catches the mismatch on the review screen. Validate the encoded contract and amount against the selected transfer, apply them, or reject payment-request QRs and accept only address locators.
Useful? React with 👍 / 👎.
closes #1205 , closes #92
Summary by CodeRabbit
New Features
Bug Fixes