Conversation
- add containerToIntent() helper in utils/intent.ts that wraps orderToIntent with automatic namespace detection (solana vs eip155) from OrderContainer - replace all orderToIntent(container) call sites with containerToIntent() - alias StandardOrderIntent as StandardEVMIntent in intentExecution.ts - add local idToToken() in intentList.ts (removed from @lifi/intent exports)
- Bump @lifi/intent from 0.0.3-alpha.1 to 0.0.4 - Add chainNamespace field to CoreToken in toCoreTokenContext - Fix containerToIntent: use 'in' narrowing for proper TypeScript overload resolution - Add StandardSolanaIntent guards in IntentFactory compact/escrow methods - Add StandardSolanaIntent guard in Solver.claim before finaliseIntent
590ef83 to
0e50986
Compare
…eld-on-lintentorg Add optional recipient field for intent outputs
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
…changes Resolve merge conflicts caused by tab-to-spaces reformatting on develop (Mobile fixes #32). Accept develop's formatting and functional additions (same-chain timings, wallet connectors, token management), then re-apply PR #39's API migration (containerToIntent wrapper, Solana gating, recipient field, @lifi/intent v0.0.4). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🚀 Preview deployed! Worker: |
🔍 QA Review — V2-109
🧠 What this ticket doesExtends the
📋 Ticket SummaryAdd Solana as a pure order on @lifi/intent (intent.ts) Acceptance Criteria:
🏷️ PR Naming
✅ Ticket Coverage — High (intent.ts PR #3) / Medium (lintent PR #39)intent.ts PR #3: Comprehensive — lintent PR #39: Adapts 10 call sites from
|
| # | Severity | Type | Issue / File |
|---|---|---|---|
| 1 | 🔴 High | Code | .claude/settings.local.json committed — violates .gitignore; must be removed — lintent PR #39 |
| 2 | 🟠 Medium | Test gap | containerToIntent() dispatch logic has no unit test — src/lib/utils/intent.ts (new) |
🔴 [High] .claude/settings.local.json committed — violates .gitignore
lintent PR #39 adds .claude/settings.local.json to the repository. The repo's own .gitignore contains .claude and .claude/* — this file should never have been tracked. It contains internal Claude Code tool permission allowlists (Bash command patterns) and is a local developer artifact with no relevance to the codebase.
Fix: Remove .claude/settings.local.json from the PR. Run git rm --cached .claude/settings.local.json to untrack it, then amend or add a commit. Verify git check-ignore -v .claude/settings.local.json confirms it is gitignored.
🟠 [Medium] containerToIntent() dispatch logic has no unit test — src/lib/utils/intent.ts (new)
src/lib/utils/intent.ts adds a SOLANA_CHAIN_IDS set and a dispatch function that routes to StandardEVMIntent, StandardSolanaIntent, or MultichainOrderIntent based on originChainId. This is the critical namespace-detection path used by 10 call sites across the app. The only test in the PR (recipientField.test.ts) does not cover this module.
Missing tests (add to tests/unit/containerToIntent.test.ts (new)):
- Solana devnet chainId → returns
StandardSolanaIntent - Solana mainnet chainId → returns
StandardSolanaIntent - EVM chainId (e.g.
1nfor Ethereum) → returnsStandardEVMIntent - Multichain input settler → returns
MultichainOrderIntent
🧪 Test Coverage
| Layer | Score | Files reviewed |
|---|---|---|
| Unit | Partial (lintent) / Good (intent.ts) | solanaStandard.spec.ts, output-encoding.spec.ts, shared.spec.ts, fromOrder.spec.ts, standard.spec.ts, recipientField.test.ts |
| Integration | N/A | UI and library — no DB/worker interactions |
| E2e | N/A | Manual test plan partially complete (intent creation unchecked) |
Unit gaps:
[Medium] containerToIntent()— no test for namespace dispatch (see issue chore: call submit order after swap #2 above)
🔗 Downstream Impact
Related to V2-108 (Lintent.org Solana). V2-116 (Add Recipient field on lintent.org, lintent PR #41) is stacked on this branch and must wait for V2-109 to merge first.
QA Agent (lifi-qa-agent[bot]) — 2026-05-06
Context
The
intent.tspackage refactored its class hierarchy, introducing two breaking changes:orderToIntent()signature changed — now requires an explicit{ namespace, inputSettler, order }object instead of accepting anOrderContainerdirectly. Thenamespacefield ("eip155"|"solana") determines which intent class to instantiate.StandardOrderIntentrenamed toStandardEVMIntent— the class was renamed to reflect that it's EVM-specific.idToTokenremoved from the public exports — was used to extract a token address from a compact lock ID.Changes
src/lib/utils/intent.ts(new) —containerToIntent(container: OrderContainer): OrderIntentwrapper that auto-detects namespace from the order'soriginChainId(Solana chain IDs →"solana", everything else →"eip155") and callsorderToIntentwith the correct shape.All
orderToIntent(container)call sites replaced withcontainerToIntent(container)across 10 files (state.svelte.ts,flowProgress.ts,solver.ts,intentList.ts,+page.svelte, and all affected screens).intentExecution.ts— importsStandardEVMIntent as StandardOrderIntentto preserve all existinginstanceofchecks without cascading renames.intentList.ts— localidToToken()implementation (lower 160 bits of the compact lock ID = token address), replacing the removed library export.Test plan
orderId()crashes)Expected output for standard and multichains outputs
Screen.Recording.2026-04-07.at.11.31.00.AM.mov