fix: auto-switch wallet to Gnosis Chain + fix Vite dev CORS#49
Open
crtahlin wants to merge 1 commit into
Open
Conversation
- Reorder wagmi chains to [gnosis, mainnet] so Gnosis is the default - Add useEffect in Layout to auto-switch chain when wallet is on wrong network - Add ui/.env.development with VITE_BEE_API_URL=/bee-api so the Vite dev server proxies Bee API calls (fixes CORS issue showing node as "off" on port 3002) - Update Phase 1a testing doc with proxy setup instructions Closes GasperX93#48 AI-assisted implementation.
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.
Summary
Two issues discovered during Phase 1a smoke testing:
useSwitchChainin Layout when wallet is on wrong networkui/.env.developmentto route through the existing Vite proxy (/bee-api/*)Also updates the Phase 1a testing doc with proxy setup instructions.
Closes #48
Changed files
ui/src/wagmi.ts[gnosis, mainnet]ui/src/components/Layout.tsxuseAccount+useSwitchChain+ auto-switch effectui/.env.developmentVITE_BEE_API_URL=/bee-apidocs/testing/phase-1a-swarm-notify.mdAI-assisted implementation.