refactor: Better RPC handling#1373
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1373 +/- ##
=======================================
Coverage 74.99% 74.99%
=======================================
Files 184 184
Lines 4519 4519
Branches 1108 1108
=======================================
Hits 3389 3389
Misses 1130 1130 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
adonesky1
reviewed
Oct 15, 2025
adonesky1
reviewed
Oct 15, 2025
adonesky1
reviewed
Oct 15, 2025
adonesky1
reviewed
Oct 15, 2025
jiexi
reviewed
Oct 15, 2025
adonesky1
reviewed
Oct 16, 2025
adonesky1
reviewed
Oct 16, 2025
adonesky1
reviewed
Oct 16, 2025
Co-authored-by: Alex Donesky <alex.donesky@consensys.net>
adonesky1
approved these changes
Oct 16, 2025
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Explanation
References
Checklist
Note
Refactors RPC handling to a strategy-based router that defaults to wallet passthrough, removes direct Infura/readonly fetch logic, adds a routing strategy module, and updates/adjusts tests (including skipping a readonly RPC test).
RequestHandlingStrategywithWALLET,RPC, andSDKroutes viamultichain/rpc/strategy.ts.RPCClient.invokeMethodto route by strategy; implement wallet passthrough and stub handlers forRPC/SDK.250msto10msin wallet handling.multichain/rpc/client.test.tsto validate wallet routing and error handling; drop tests for fetch/headers/readonly RPC behavior.invoke.test.ts, skip the readonly RPC client test pending RPC node routing and keep other invoke error/success paths.Written by Cursor Bugbot for commit 19a136d. This will update automatically on new commits. Configure here.