Skip to content

refactor: update RPC URL handling for various networks#418

Merged
onahprosper merged 1 commit intostablefrom
fix-rpc-url
Mar 12, 2026
Merged

refactor: update RPC URL handling for various networks#418
onahprosper merged 1 commit intostablefrom
fix-rpc-url

Conversation

@Dprof-in-tech
Copy link
Copy Markdown
Collaborator

Description

  • Replaced hardcoded RPC URLs with dynamic URLs using environment variable for improved flexibility and maintainability.
  • Updated the getRpcUrl function to return new API endpoints for Polygon, BNB Smart Chain, Base, Arbitrum One, Celo, Lisk, and Ethereum networks.

This pull request updates the way RPC URLs are generated for different blockchain networks in the getRpcUrl function. Instead of using Thirdweb endpoints and the NEXT_PUBLIC_THIRDWEB_CLIENT_ID, the function now uses Dwellir endpoints and a new environment variable, NEXT_PUBLIC_RPC_URL_KEY, for authentication.

RPC URL provider migration:

  • Switched RPC endpoints for all supported networks in getRpcUrl from Thirdweb to Dwellir, and replaced usage of NEXT_PUBLIC_THIRDWEB_CLIENT_ID with NEXT_PUBLIC_RPC_URL_KEY for authentication. (app/utils.ts)

References

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation and tests for new/changed functionality in this PR
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

By submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.

* Replaced hardcoded RPC URLs with dynamic URLs using environment variable for improved flexibility and maintainability.
* Updated the getRpcUrl function to return new API endpoints for Polygon, BNB Smart Chain, Base, Arbitrum One, Celo, Lisk, and Ethereum networks.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f31b9100-d8e2-46f5-9fda-cc339ac170bc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-rpc-url
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@onahprosper onahprosper merged commit cbeb4bf into stable Mar 12, 2026
1 check passed
@onahprosper onahprosper deleted the fix-rpc-url branch March 12, 2026 20:57
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.

2 participants