Conversation
The 1inch token list at ipfs.io/ipns/tokens.1inch.eth returns 504 on all IPFS gateways — the IPNS record is unmaintained. Removed the dead source. Made fetchTokenList resilient: a failing source now logs a warning and returns an empty list instead of throwing, so one broken source doesn't block the entire app.
New state-only hook that answers "is the wallet ready to interact with this chain?" Built on top of useWeb3Status. Closes part of #303
The withWalletStatusVerifier HoC is removed. The WalletStatusVerifier wrapper component now uses the useWalletStatus hook internally. Extracts shared SwitchChainButton to ui/SwitchChainButton.tsx. Same external API — no breaking change for wrapper consumers. Closes part of #303
TransactionButton now uses useWalletStatus hook directly instead of being wrapped with withWalletStatusVerifier HoC. Adds optional chainId, fallback, and switchChainLabel props. Closes part of #303
SignButton now uses useWalletStatus hook directly instead of withWalletStatusVerifier HoC. Adds optional chainId, fallback, and switchChainLabel props. Closes part of #303
… HoC NativeToken, ERC20ApproveAndTransferButton, and OptimismCrossDomainMessenger now use the declarative <WalletStatusVerifier> wrapper instead of withWalletStatusVerifier. Suspense HoCs (withSuspense, withSuspenseAndRetry) are preserved. Closes #303
- Add targetChainId to useWalletStatus return, removing unsafe `as ChainsIds` casts from all consumers - Fix onSuccess callback in ERC20ApproveAndTransferButton demo (was returning refetchBalance instead of passing it directly)
WalletStatusVerifier now provides a React Context with the connected wallet data. useWeb3StatusConnected reads from that context and throws a DeveloperError if called outside the tree, so error boundaries show the message without a "Try Again" button. - Rename labelSwitchChain to switchChainLabel for consistency - useOPL1CrossDomainMessengerProxy accepts walletAddress parameter - Demo components wrap with WalletStatusVerifier from outside - Add DeveloperError class for non-retriable structural errors
Add architecture.md with full project documentation covering tech stack, directory structure, data flow, environment variables, scripts, and domain-specific sections (number precision, provider hierarchy, hook patterns, error handling, smart contract integration, wallet access control). Slim down CLAUDE.md by moving structural/reference content to architecture.md, keeping only operational rules, conventions, and how-to instructions. Add a soft reference so LLMs know to read architecture.md when working on structure-related tasks.
Extract RPC URL strings from networks.config.ts into an exported `rpcUrls` map (single source of truth) and pass them to LI.FI's createConfig via the `rpcUrls` option. Without this, LI.FI's EVM provider fell back to hardcoded default RPCs from the li.quest API (arb1.arbitrum.io for Arbitrum), which hit CORS blocks and 429 rate limits, causing getTokenBalances to fail entirely. Closes #469
Extract rpcUrls into a shared map and derive lifiRpcUrls from it so LI.FI's createConfig receives the project-configured endpoints instead of its bundled defaults. Fixes CORS errors and 429s on Arbitrum.
fix(use-tokens): route LI.FI RPC calls through configured transports
- Remove legacy pull_request_template.md, bug_report.md, feature_request.md - Replace .github/PULL_REQUEST_TEMPLATE.md with current starter-kit version (adds "No related issue" hint, splits Test plan, adds Screenshots section) - Replace issue templates 1-bug, 2-feature, 3-epic with starter-kit versions (unifies Severity → Priority across all issue types) - Replace .claude/skills/issue/SKILL.md (renamed to sdlc:issue, priority unified) - Add .claude/skills/create-pr/ skill (new) - Update AGENTS.md to match starter-kit wording - Smart-merge CLAUDE.md: add "No related issue" guidance, unify Label Conventions to single Priority table, update skill references to sdlc:issue and sdlc:create-pr Closes #472
chore: sync SDLC files with bootnode-sdlc starter-kit
…onnected - Add sortByBalance prop to TokenSelect / TokenInput / TokenDropdown; defaults to isWalletConnected so held tokens surface without any consumer-side change - Decouple balance fetch/sort from showBalance so the balance column and the sort are independent concerns; showBalance only controls the per-row balance column - Add updateTokensWithRawBalances export for on-chain multicall path - Add multicall fallback in useTokens: when the active chain is not covered by LI.FI (e.g. Sepolia), fetch ERC-20 balances via multicall and native balance via getBalance, then sort with the same sortFn - Add tests asserting positive-balance tokens precede zero-balance tokens and that source order is preserved within each group Closes #466
…ble hook call
WalletStatusVerifier was calling useWeb3Status() directly in addition to
calling it internally via useWalletStatus(), executing the hook body twice
per render. Exposing web3Status from useWalletStatus eliminates the redundant
call.
Also fixes || to ?? for chain ID fallback (prevents a falsy 0 chainId from
silently falling through) and adds chainId={sepolia.id} to the TransactionButton
in NativeToken — without it the inner button checked against appChainId instead
of the Sepolia chain already verified by the parent WalletStatusVerifier.
…refactor - Lowercase token addresses when keying the on-chain balances map and when reading in updateTokensWithRawBalances, preventing silent zero-balance fallback if token lists mix address casing - Complete web3Status exposure from useWalletStatus (was missing from the previous commit): add web3Status to WalletStatus interface and return, remove the redundant useWeb3Status() call from WalletStatusVerifier - Assert result.current.web3Status in useWalletStatus tests - Update all useWalletStatus mock shapes across test files to carry web3Status - Document multicall fallback path and absent priceUSD in useTokens JSDoc - Add inline comment on NativeToken chainId prop - Move threeTokens fixture inside its describe block
feat(token-select): sort by positive balance by default when wallet connected
fix(header): remove fixed height from logo to preserve aspect ratio
…vider fix(token-select): remove trailing divider from last network item
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Release promotion PR for v2.5.0, merging accumulated develop changes into main (tooling upgrades, token UX improvements, wallet gating refactors, and assorted fixes/docs/CI updates).
Changes:
- Upgrade build/tooling stack (Vite v8, Biome v2, TS v6, dependency bumps) and adjust related configs/workflows/templates.
- Improve token UX (native chain icons, Sepolia support + bundled faucet list, balance-based sorting, USD/balance display fixes).
- Refactor wallet readiness gating (new
useWalletStatus, context-baseduseWeb3StatusConnected) and update dependent components/tests.
Reviewed changes
Copilot reviewed 139 out of 142 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vocs.config.ts | Import ordering update. |
| vite.config.ts | Vite plugin changes and updated chunking + resolve config. |
| vercel.json | CSP report-only updated to allow WalletConnect verification iframe. |
| typedoc.json | Typedoc entrypoints and blockTags updated. |
| tsconfig.json | Compiler options adjusted (interop/types/etc). |
| src/utils/suspenseWrapper.tsx | Error boundary/suspense wrapper tweaks + DeveloperError handling. |
| src/utils/numberFormat.test.ts | Import order update. |
| src/utils/hash.ts | Import order update. |
| src/utils/hash.test.ts | Import order update. |
| src/utils/getTransactionOutputs.ts | Import order update. |
| src/utils/getTransactionOutputs.test.ts | Import order update. |
| src/utils/getExplorerLink.test.ts | Import order update. |
| src/utils/address.ts | Add LI.FI native address normalization helper. |
| src/utils/DeveloperError.ts | New error class for non-retryable developer mistakes. |
| src/routes/__root.tsx | Root route imports reorganized; remove printAppInfo effect. |
| src/providers/Web3Provider.tsx | Import ordering adjustments. |
| src/providers/TransactionNotificationProvider.tsx | Toast type fix + lint-avoidance refactors. |
| src/main.tsx | Call printAppInfo() at entrypoint. |
| src/lib/wallets/web3modal.config.tsx | Import ordering adjustments. |
| src/lib/wallets/portoInit.ts | Gate Porto init behind HTTPS. |
| src/lib/wallets/connectkit.config.tsx | Derive appUrl safely in SSR contexts. |
| src/lib/wagmi/plugins/reactSuspenseRead.ts | Improve biome-ignore rationale comments. |
| src/lib/networks.config.ts | Add public RPC fallbacks + LI.FI rpcUrls shape + reuse in transports. |
| src/lib/networks.config.test.ts | New tests for rpcUrls/lifiRpcUrls behavior. |
| src/hooks/useWeb3Status.tsx | Remove useWeb3StatusConnected from this hook file. |
| src/hooks/useWeb3Status.test.ts | Update tests to new useWeb3StatusConnected location/behavior. |
| src/hooks/useWalletStatus.ts | New hook encapsulating wallet readiness/chain switching + exposes web3Status. |
| src/hooks/useWalletStatus.test.ts | New tests for wallet readiness logic. |
| src/hooks/useTokens.test.ts | New tests for native sentinel mapping + sort-by-balance behaviors. |
| src/hooks/useTokenLists.ts | Add bundled lists support, chainId filtering, and resilient fetch behavior. |
| src/hooks/useTokenLists.test.ts | Expand tests incl. fetch failure handling + chainId filtering. |
| src/hooks/useOPL1CrossDomainMessengerProxy.ts | Require walletAddress explicitly; remove connected hook dependency. |
| src/hooks/useNetworkBlockNumber.ts | Import order update. |
| src/hooks/useErc20Balance.test.ts | Import order update. |
| src/env.ts | Fix boolean default typing for zod transform pipeline. |
| src/constants/tokenLists.ts | Add bundled token lists + Sepolia faucet list gating; fix doc typo. |
| src/constants/contracts/contracts.ts | Import ordering + minor type formatting. |
| src/constants/common.ts | Add NO_PRICE_DATA_LABEL. |
| src/constants/aaveSepoliaFaucet.ts | New bundled Aave Sepolia faucet token list. |
| src/components/ui/toaster.tsx | Import ordering update. |
| src/components/ui/provider.tsx | Export system and hoist theme config for reuse in tests. |
| src/components/sharedComponents/ui/SwitchThemeButton/index.tsx | Import ordering update. |
| src/components/sharedComponents/ui/SwitchThemeButton/assets/Light.tsx | Import ordering update. |
| src/components/sharedComponents/ui/SwitchThemeButton/assets/Dark.tsx | Import ordering update. |
| src/components/sharedComponents/ui/SwitchChainButton.tsx | New shared “Switch chain” styled button. |
| src/components/sharedComponents/ui/SecondaryButton/index.tsx | Import ordering update. |
| src/components/sharedComponents/ui/PrimaryButton/index.tsx | Import ordering update. |
| src/components/sharedComponents/ui/Modal/index.tsx | Import ordering update. |
| src/components/sharedComponents/ui/Menu/index.tsx | Ensure last item divider doesn’t reappear on hover/active; set flexDirection. |
| src/components/sharedComponents/ui/Header/index.tsx | Import ordering update. |
| src/components/sharedComponents/ui/Header/MobileMenu/MobileMenu.tsx | Import ordering update. |
| src/components/sharedComponents/ui/Header/MainMenu.tsx | Import ordering update. |
| src/components/sharedComponents/ui/Header/Logo.tsx | Remove hardcoded height to preserve aspect ratio. |
| src/components/sharedComponents/ui/Footer/index.tsx | Import ordering update. |
| src/components/sharedComponents/ui/Footer/Socials/index.tsx | Import ordering update. |
| src/components/sharedComponents/ui/ExternalLink/index.tsx | Import ordering update. |
| src/components/sharedComponents/ui/DropdownButton.tsx | Import ordering update. |
| src/components/sharedComponents/dev/TanStackRouterDevtools.tsx | Update devtools package import path. |
| src/components/sharedComponents/dev/TanStackReactQueryDevtools.tsx | Import ordering update. |
| src/components/sharedComponents/WalletStatusVerifier.tsx | Refactor to context-based connected status + useWalletStatus + remove HOC. |
| src/components/sharedComponents/TransactionButton.tsx | Make wallet gating self-contained (connect/switch/ready states). |
| src/components/sharedComponents/TransactionButton.test.tsx | Rewrite tests around new useWalletStatus gating behavior. |
| src/components/sharedComponents/TokenSelect/index.tsx | Add optional balance sorting behavior; adjust children placement. |
| src/components/sharedComponents/TokenSelect/TopTokens/index.tsx | Import ordering + comment improvement. |
| src/components/sharedComponents/TokenSelect/TopTokens/Item.tsx | Import ordering update. |
| src/components/sharedComponents/TokenSelect/Search/index.tsx | Import ordering update. |
| src/components/sharedComponents/TokenSelect/List/index.tsx | Import ordering update. |
| src/components/sharedComponents/TokenSelect/List/TokenBalance.tsx | Add on-chain fallback rendering + N/A label; refactor styling props. |
| src/components/sharedComponents/TokenSelect/List/TokenBalance.test.tsx | New tests for balance + fallback rendering cases. |
| src/components/sharedComponents/TokenSelect/List/Row.tsx | Reuse shared BalanceLoading component. |
| src/components/sharedComponents/TokenSelect/List/BalanceLoading.tsx | New extracted loading skeleton component. |
| src/components/sharedComponents/TokenSelect/List/AddERC20TokenButton.tsx | Import ordering update. |
| src/components/sharedComponents/TokenLogo/nativeTokenIcons.tsx | Map chain IDs to chain-native icons. |
| src/components/sharedComponents/TokenLogo/index.tsx | Render native chain icon for native tokens; simplify placeholder color logic. |
| src/components/sharedComponents/TokenLogo/TokenLogo.test.tsx | Update tests and add native-icon coverage. |
| src/components/sharedComponents/TokenInput/useTokenInput.tsx | Expose priceUSD/loading via useTokens; fix native client chain binding. |
| src/components/sharedComponents/TokenInput/useTokenInput.test.ts | New tests for chain rebinding + price exposure. |
| src/components/sharedComponents/TokenInput/index.tsx | Display estimated USD (incl. N/A on testnets) + pass sortByBalance through. |
| src/components/sharedComponents/TokenInput/Components.tsx | CloseButton layout tweak + import ordering. |
| src/components/sharedComponents/TokenDropdown.tsx | Import ordering update. |
| src/components/sharedComponents/SwitchNetwork.tsx | Import ordering update. |
| src/components/sharedComponents/SwitchNetwork.test.tsx | Import ordering update. |
| src/components/sharedComponents/SignButton.tsx | Make wallet gating self-contained (connect/switch/ready states). |
| src/components/sharedComponents/SignButton.test.tsx | New tests for new wallet gating behavior. |
| src/components/sharedComponents/NotificationToast.tsx | Import ordering update. |
| src/components/sharedComponents/HashInput.tsx | Import ordering update. |
| src/components/sharedComponents/Hash.tsx | Import ordering update. |
| src/components/sharedComponents/ExplorerLink.tsx | Import ordering update. |
| src/components/sharedComponents/ConnectButton/index.tsx | Import ordering update. |
| src/components/sharedComponents/BigNumberInput.tsx | Fix renderInput sync by introducing displayValue state + sync guards. |
| src/components/sharedComponents/BigNumberInput.test.tsx | Add NumericFormat/renderInput sync tests. |
| src/components/sharedComponents/Avatar.tsx | Work around Vite 8 CJS interop for react-jazzicon. |
| src/components/pageComponents/home/index.test.tsx | Import ordering update. |
| src/components/pageComponents/home/Welcome/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/subgraphs/SubgraphStatus/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/subgraphs/Subgraph/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/TransactionButton/index.tsx | Simplify verifier wrapper usage. |
| src/components/pageComponents/home/Examples/demos/TransactionButton/index.test.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/TransactionButton/NativeToken.tsx | Use context-based connected hook; pass explicit chainId into TransactionButton. |
| src/components/pageComponents/home/Examples/demos/TransactionButton/ERC20ApproveAndTransferButton/index.tsx | Remove HOC gating; fix onSuccess callback invocation. |
| src/components/pageComponents/home/Examples/demos/TransactionButton/ERC20ApproveAndTransferButton/MintUSDC.tsx | Use context-based connected hook; import ordering. |
| src/components/pageComponents/home/Examples/demos/TransactionButton/ERC20ApproveAndTransferButton/ERC20ApproveAndTransferButton.tsx | Use context-based connected hook; import ordering. |
| src/components/pageComponents/home/Examples/demos/TokenInput/index.tsx | Default demo to multi-token; add Sepolia network option behind includeTestnets. |
| src/components/pageComponents/home/Examples/demos/TokenInput/index.test.tsx | Update demo tests (multi default + Sepolia option). |
| src/components/pageComponents/home/Examples/demos/TokenDropdown/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/SwitchNetwork/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/SignMessage/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/OptionsDropdown/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/OptimismCrossDomainMessenger/index.tsx | Refactor gating to WalletStatusVerifier wrapper; pass walletAddress explicitly. |
| src/components/pageComponents/home/Examples/demos/HashHandling/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/HashHandling/Hash.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/demos/EnsName/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/List/index.tsx | Import ordering update. |
| src/components/pageComponents/home/Examples/Item/index.tsx | Import ordering update. |
| src/components/pageComponents/NotFound404.tsx | Import ordering update. |
| pull_request_template.md | Remove legacy PR template in favor of .github template. |
| package.json | Bump version to 2.5.0 and upgrade dependencies/tooling. |
| commitlint.config.js | Add explicit allowed commit types. |
| biome.json | Update to Biome v2 schema and config keys. |
| AGENTS.md | Replace with pointer to CLAUDE.md as source of truth. |
| .gitignore | Ignore additional docs-generated outputs. |
| .github/workflows/pr-self-assign.yml | Add workflow to self-assign PR author. |
| .github/workflows/conventional-commits-PR-title.yml | Update PR title conventional commit validator action/config. |
| .github/PULL_REQUEST_TEMPLATE.md | Add new PR template in .github. |
| .github/ISSUE_TEMPLATE/feature_request.md | Remove legacy markdown issue template. |
| .github/ISSUE_TEMPLATE/bug_report.md | Remove legacy markdown issue template. |
| .github/ISSUE_TEMPLATE/4-spike.yml | Add structured spike issue form. |
| .github/ISSUE_TEMPLATE/3-epic.yml | Add structured epic issue form. |
| .github/ISSUE_TEMPLATE/2-feature.yml | Add structured feature issue form. |
| .github/ISSUE_TEMPLATE/1-bug.yml | Add structured bug issue form. |
| .env.test | Explicitly unset optional RPC vars to prevent env leakage into tests. |
| .env.example | Clarify RPC override behavior and reorganize RPC env vars list. |
| .claude/skills/issue/SKILL.md | Add issue-creation skill documentation. |
| .claude/skills/create-pr/get-reviewers.sh | Add helper script for reviewer selection. |
| .claude/skills/create-pr/get-base-branch.sh | Add helper script to detect likely PR base branch. |
| .claude/skills/create-pr/SKILL.md | Add PR-creation skill documentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (isLoading) { | ||
| throw Promise.reject() | ||
| } |
There was a problem hiding this comment.
throw Promise.reject() will throw a rejected promise, which is treated as an error by the ErrorBoundary (showing the error fallback) rather than suspending with the Suspense fallback. For a loading state here, return the loading skeleton (<BalanceLoading />) or suspend by throwing a pending promise instead of a rejected one.
| const estimatedUSDValue = useMemo(() => { | ||
| if (isTestnetChain) return null | ||
| if (!selectedToken || !priceUSD || !balance) return 0 | ||
| const tokenBalance = Number.parseFloat(formatUnits(balance, selectedToken.decimals ?? 0)) | ||
| return Number.parseFloat(priceUSD) * tokenBalance | ||
| }, [isTestnetChain, selectedToken, priceUSD, balance]) |
There was a problem hiding this comment.
estimatedUSDValue is currently computed from the wallet balance (balance) rather than the user-entered amount. This makes the ~$... display track the account’s holdings, not the input value. Compute the estimate from amount (formatted with selectedToken.decimals) and the selected token’s priceUSD instead, and consider showing N/A when priceUSD is unavailable.
Summary
No related issue. Promote develop to main as the v2.5.0 release.
Bumps the version from 2.0.4 to 2.5.0 and merges all work accumulated on develop since the last release: native-token chain icons, token-select balance sorting and Sepolia support, TokenInput USD display and multicall fixes, a Vite v8 upgrade, and a wide range of bug fixes and dependency updates across the stack.
Changes
Acceptance criteria
Test plan
Automated tests
Test files added/updated in this cycle:
src/components/sharedComponents/BigNumberInput/*.test.tsxsrc/components/sharedComponents/TokenLogo/*.test.tsxsrc/components/sharedComponents/TokenInput/*.test.tsxsrc/components/sharedComponents/SignButton/*.test.tsxsrc/components/sharedComponents/TransactionButton/*.test.tsxRun:
pnpm testManual verification
pnpm buildBreaking changes
None.
Checklist
Screenshots
None.