refactor: Update mainnet RPC API URL to use new endpoint#844
refactor: Update mainnet RPC API URL to use new endpoint#844askov wants to merge 1 commit intosolana-foundation:masterfrom
Conversation
|
@askov is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Greptile OverviewGreptile SummaryThis PR updates the Solana mainnet RPC URL from
The changes are clean and well-tested. However, several test files and documentation still reference the old URL and should be updated for complete consistency:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant App as Explorer App
participant ClusterUtils as cluster.ts
participant ModifyURL as modifyUrl()
participant RPC as RPC Endpoint
Note over ClusterUtils: MAINNET_BETA_URL updated<br/>from api.mainnet-beta.solana.com<br/>to api.mainnet.solana.com
App->>ClusterUtils: Request cluster URL
ClusterUtils->>ModifyURL: modifyUrl(MAINNET_BETA_URL)
alt hostname === 'localhost'
ModifyURL-->>ClusterUtils: Return unchanged URL<br/>https://api.mainnet.solana.com
else hostname !== 'localhost'
ModifyURL-->>ClusterUtils: Return modified URL<br/>https://explorer-api.mainnet.solana.com
end
ClusterUtils-->>App: Return final URL
App->>RPC: Connect to RPC endpoint
RPC-->>App: RPC connection established
|
| } | ||
|
|
||
| export const MAINNET_BETA_URL = 'https://api.mainnet-beta.solana.com'; | ||
| export const MAINNET_BETA_URL = 'https://api.mainnet.solana.com'; |
There was a problem hiding this comment.
Check that test files still referencing api.mainnet-beta.solana.com are updated:
app/features/security-txt/model/__tests__/useSecurityTxt.spec.ts:16app/components/inspector/__tests__/InspectorPage.spec.tsx:142app/components/account/__tests__/AccountHeader.spec.tsx:16CONTRIBUTING.md:31
There was a problem hiding this comment.
Not yet, there are a lot of changes required. The goal here is to make it work.
There was a problem hiding this comment.
Yeah. There will be a consecutive task with changes in the whole project. Agreed.
rogaldh
left a comment
There was a problem hiding this comment.
LGTM
We are waiting for Alpenglow to be released.
Description
Updates the Solana mainnet RPC URL from api.mainnet-beta.solana.com to api.mainnet.solana.com. Also adds unit tests for modifyUrl.
The follow-up task
Type of change
Testing
Related Issues
Closes HOO-221
Checklist