docs: sync architecture.md with current codebase#459
docs: sync architecture.md with current codebase#459gabitoesmiapodo merged 4 commits intodevelopfrom
Conversation
Update five stale references: - TypeScript 5 -> 6 - Vite 6 + SWC -> Vite 8 + React plugin - Remove nonexistent withWalletStatusVerifier HOC references - Token list sources: remove 1INCH (only CoinGecko exists) - staleTime/gcTime: Infinity -> 1 hour Closes #452
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Updates architecture.md to realign key “structural truth” documentation with the current TypeScript/Vite/tooling and wallet/token-list implementations in the repository.
Changes:
- Update documented TypeScript (5 → 6) and Vite (6+SWC → 8 + React plugin) versions to match
package.json/Vite config. - Remove stale references to a nonexistent
withWalletStatusVerifierHOC and update the wallet-gating narrative. - Correct token list sources (CoinGecko + optional Uniswap default list) and TanStack Query caching durations for token lists (Infinity → 1 hour).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move from Web3 connection state section to Wallet Access Control section and correct the file path and throw behavior to match the actual implementation in WalletStatusVerifier.tsx.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **`WalletStatusVerifier`** component (`src/components/sharedComponents/WalletStatusVerifier.tsx`) -- renders a fallback cascade based on wallet state: | ||
| 1. Not connected -> `ConnectWalletButton` | ||
| 2. Connected but `walletChainId !== appChainId` -> "Switch to [Network]" button | ||
| 3. Connected + synced -> renders children |
There was a problem hiding this comment.
In the WalletStatusVerifier fallback cascade, step 2 currently documents the chain mismatch check as walletChainId !== appChainId, but the component uses useWalletStatus({ chainId }), which compares the wallet chain against targetChainId (the optional chainId prop if provided, otherwise appChainId). Please update the step-2 wording to reflect that the verifier gates on the requested/target chain, not strictly appChainId.
There was a problem hiding this comment.
Fixed in 891f992. Updated the chain mismatch check description to reference targetChainId and documented the full fallback cascade (optional chainId prop -> appChainId -> chains[0].id).
The fallback cascade step 2 referenced appChainId, but useWalletStatus compares against targetChainId which accounts for the optional chainId prop. Updated wording to reflect the actual behavior.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Closes #452
architecture.mdis referenced byCLAUDE.mdas structural truth for developers and agents, but five sections had drifted from the actual codebase. This PR corrects all reported discrepancies.Changes
package.jsonpackage.jsonwithWalletStatusVerifierHOC references (3 locations); document the actual pattern (useWalletStatus()hook used directly inTransactionButtonandSignButton)tokenLists.ts)staleTime/gcTimefromInfinityto1 hourto matchuseTokenLists.tsAcceptance criteria
withWalletStatusVerifierHOC references removed or correctedstaleTime/gcTimevalues corrected to 1 hourTest plan
Automated tests
No automated tests added. Documentation-only change.
Manual verification
No manual steps required. All changes verified against
package.json,tokenLists.ts, anduseTokenLists.ts.Breaking changes
None.
Screenshots
None.
Checklist