Repository navigation
Conversation
Contributor
Author
|
@metamaskbot publish-previews |
Add an optional `isNetworkAllowed` constructor callback so hosts can block RampsController network access at runtime. Every method that can reach the network checks it before any state write or request and throws an error with the new `NETWORK_ACCESS_DENIED` error key; denied calls do not serve request-cache entries either. `addOrder`, `addPrecreatedOrder`, `removeOrder`, and `transakLogout` keep their local change and skip only the remote call, and order polling pauses without extending its backoff.
…ense Link the entry to its pull request and match the changelog voice required for shipping.
Sync the generated action-type docs with the network-gate JSDoc added to addOrder, addPrecreatedOrder, removeOrder, and transakLogout.
wenfix
force-pushed
the
ramps-privacy-guard
branch
from
November 3, 2026 14:30
0d9e1b3 to
eb5c879
Compare
Contributor
Author
|
@metamaskbot publish-previews |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
This branch has not been deployed
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
Adds an optional
isNetworkAllowedconstructor option toRampsControllerso the host can block RampsController network access at runtime.Every method that can reach the network checks the option before any state write or request, and throws an error carrying the new
RAMPS_ERROR_CODES.NETWORK_ACCESS_DENIEDcode when it returnsfalse. Denied calls do not serve non-expired request-cache entries either, so hosts render already-fetched data from controller state while access is denied.addOrder,addPrecreatedOrder,removeOrder, andtransakLogoutstill apply their local change and skip only the remote call; deferred order writes are picked up by the next full sync. Order polling pauses while access is denied without extending its backoff. Omitting the option keeps the existing behavior.Checklist