Skip to content
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

fix(website): add custom default rpcs #1604

Merged
merged 1 commit into from
Dec 27, 2024
Merged

fix(website): add custom default rpcs #1604

merged 1 commit into from
Dec 27, 2024

Conversation

mjlescano
Copy link
Member

This PR adds the possibility for changing the default rpcs given by viem. In our case this is necessary because we've been seeing that the default Sepolia rpc does not work properly for the users on the website.

Copy link

changeset-bot bot commented Dec 27, 2024

⚠️ No Changeset found

Latest commit: 804e935

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@nicosampler nicosampler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason why we don't update the default viem transport instead?

const client = createPublicClient({ 
  chain: mainnet, 
  transport: http(), // <-- here
}) 

@mjlescano
Copy link
Member Author

mjlescano commented Dec 27, 2024

Because that one is only used for the registry and it is for ETH Mainnet (which is working properly). I modified only the Sepolia default rpc, which is used in Interact and Deploy, and because of the way i did it, the user can still use their custom rpc on the settings and it will be overriden.

@noahlitvin noahlitvin merged commit e43b388 into dev Dec 27, 2024
7 of 9 checks passed
@noahlitvin noahlitvin deleted the fix-default-rpcs branch December 27, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants