feat(network): default warm storage and providers to mainnet#268
feat(network): default warm storage and providers to mainnet#268beck-8 wants to merge 1 commit intoFilOzone:mainfrom
Conversation
- default /service-providers and /warm-storage-service to chain=314 when missing - make Warm Storage contract addresses follow selected network - switch to shared network options with Mainnet shown first - remove temporary local NetworkSelector wrapper and use ui-filecoin selector - update mainnet RPC endpoint to https://api.node.glif.io/
|
@beck-8 is attempting to deploy a commit to the FilOz Team on Vercel. A member of the Team first needs to authorize it. |
|
would like a review from @mirhamasala too |
|
can we add a 🏅 icon to those who are on the endorsed list and add a footnote explain what 🏅 means? |
There was a problem hiding this comment.
Pull request overview
This PR updates the app’s network behavior to default to Filecoin Mainnet (chain id 314) when no chain query param is provided, aligns Warm Storage contract addresses with the currently selected network, and consolidates network selection UI to use the shared @filecoin-foundation/ui-filecoin selector with Mainnet prioritized.
Changes:
- Default
/service-providersand/warm-storage-servicetochain=314via server-side redirects when the query param is missing. - Make Warm Storage contract address data depend on the selected network (via
useNetwork+getNetworkId). - Replace the temporary local
NetworkSelectorwrapper with the shared selector + sharednetworkOptions(Mainnet shown first), and update Mainnet RPC URL.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/config/chains.ts | Updates Mainnet RPC HTTP endpoint to https://api.node.glif.io/. |
| src/components/NetworkSelector.tsx | Removes the temporary local NetworkSelector wrapper in favor of the shared component. |
| src/components/Network/network-options.ts | Adds shared network options with Mainnet ordered first. |
| src/app/warm-storage-service/page.tsx | Adds redirect logic to default missing chain to 314. |
| src/app/warm-storage-service/components/WarmStorageServicesClient.tsx | Wires Warm Storage contract table data to the selected network and uses shared selector/options. |
| src/app/service-providers/page.tsx | Adds redirect logic to default missing chain to 314. |
| src/app/service-providers/components/ServiceProvidersTable.tsx | Switches to shared NetworkSelector and shared network options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| import { supportedChainIds } from '@filecoin-foundation/ui-filecoin/Network/config' | ||
|
|
||
| export const networkOptions = [...supportedChainIds] | ||
| .sort((a, b) => (a === 314 ? -1 : b === 314 ? 1 : 0)) |
May be addressed later from another PR. I have some other ideas (don’t show unreachable nodes, don’t show messy nodes) |
📝 Description
default /service-providers and /warm-storage-service to chain=314 when missing
make Warm Storage contract addresses follow selected network
switch to shared network options with Mainnet shown first
remove temporary local NetworkSelector wrapper and use ui-filecoin selector
update mainnet RPC endpoint to
https://api.node.glif.io/📸 Screenshots