-
Notifications
You must be signed in to change notification settings - Fork 19
configure chain selector to show 5 networks #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure chain selector to show 5 networks #44
Conversation
📝 WalkthroughWalkthroughThis pull request updates frontend chain configuration and wallet UI visibility. App.jsx replaces dynamic chain composition with an explicit array of specific chains and imports a new BatchPayment component. Navbar.jsx updates wallet ConnectButton configurations to display full chain status and balance information on mobile and desktop views. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
frontend/src/App.jsxfrontend/src/components/Navbar.jsx
🔇 Additional comments (2)
frontend/src/components/Navbar.jsx (2)
209-218: LGTM! Desktop chain selector configured correctly.The change from
chainStatus="none"tochainStatus="full"successfully enables the chain selector display on desktop view, aligning with the PR objectives to show network selection near the wallet balance.
299-303: LGTM! Mobile wallet UI enhanced.The updates to the mobile ConnectButton configuration improve the user experience by:
- Enabling full chain status display (
chainStatus="full")- Showing balance information (
showBalance={true})These changes align with the PR objectives to configure the chain selector visibility across different viewport sizes.
| import { QueryClientProvider, QueryClient } from "@tanstack/react-query"; | ||
| import * as chains from "wagmi/chains"; | ||
|
|
||
| import { mainnet, classic, base, bsc, polygon } from 'wagmi/chains'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for citreaTestnet references to assess impact
rg -n --type=js --type=jsx --type=ts --type=tsx -C3 'citreaTestnet' -g '!node_modules/**'Repository: StabilityNexus/Chainvoice
Length of output: 96
🏁 Script executed:
#!/bin/bash
# Check for hardcoded citrea references
rg -n --type=js --type=jsx --type=ts --type=tsx -i 'citrea' -g '!node_modules/**' | head -50Repository: StabilityNexus/Chainvoice
Length of output: 96
🏁 Script executed:
#!/bin/bash
# Examine the App.jsx file around the key lines mentioned (10, 25, 70)
cat -n frontend/src/App.jsx | head -80Repository: StabilityNexus/Chainvoice
Length of output: 3157
🏁 Script executed:
#!/bin/bash
# Search for citreaTestnet references across all files
rg 'citreaTestnet' --hidden 2>/dev/null | grep -v node_modules | head -30Repository: StabilityNexus/Chainvoice
Length of output: 289
🏁 Script executed:
#!/bin/bash
# Check if CitreaTestnet utility exists and examine it
find . -name "*itrea*" -type f 2>/dev/null | grep -v node_modulesRepository: StabilityNexus/Chainvoice
Length of output: 107
🏁 Script executed:
#!/bin/bash
# Check if BatchPayment is used in routes (look for Routes section in App.jsx)
tail -n +80 frontend/src/App.jsx | head -100Repository: StabilityNexus/Chainvoice
Length of output: 1271
Remove unused citreaTestnet import on line 15.
The chain configuration correctly narrows to 5 networks [mainnet, classic, base, bsc, polygon] as intended. The citreaTestnet removal is safe—it has no other references in the codebase and is only present as an unused import. Clean up line 15 to remove the dead import: import { citreaTestnet } from "./utils/CitreaTestnet";
🤖 Prompt for AI Agents
In frontend/src/App.jsx around line 10, there's an unused import citreaTestnet
on line 15; remove the dead import statement `import { citreaTestnet } from
"./utils/CitreaTestnet";` so the file only imports the used chains (mainnet,
classic, base, bsc, polygon) and then run a quick lint/TypeScript check to
ensure no remaining references to citreaTestnet exist.
configured the chain selector to show 5 networks and also configured the connectButton to show chain selector in navbar near wallet balance.
previously (without configuration) ->

now (with configuration) ->

available networks to select in chain selector ->

Summary by CodeRabbit
UI Improvements
Updates
✏️ Tip: You can customize this high-level summary in your review settings.