Comments (2)
I would like a way to update state that returns a promise and resolves once state has been persisted, so that it will be restored in the case of a system interruption.
What about state updates for things that aren't persisted at all? Or state updates that trigger a network request that you also want to ensure has completed successfully before continuing?
This sort of thing may be better handled at a different layer than the BaseController update method. Controllers are responsible for ensuring their state remains valid, so this seems like it should be their responsibility. For example, a "profile controller" could expose an "update profile" function that respected a permission based upon a counter.
from core.
Closing for now, as I think this is better handled at a different layer than in the base controller API. We can revisit when we have a feature that needs this.
from core.
Related Issues (20)
- Support for EIP-5630 urgently needed since eth_getEncryptionPublicKey was deprecated HOT 1
- Add export for TokenBalancesControllerState type on assets-controllers
- Rename ControllerMessenger to Messenger, RestrictedControllerMessenger to RestrictedMessenger
- ESLint behaves differently on different system HOT 4
- [transaction-controller] Boundless growth of transaction history HOT 3
- Adapt EIP 1193 - AssetsContractController HOT 1
- Adapt EIP 1193 - TokensController HOT 2
- Network controller state can be corrupted
- [Regression] yarn constraints check fails with consistent dependency versions set in manifests HOT 1
- Audit implementation of all controllers against "Guidelines for Writing Controllers" HOT 1
- Fix controllers with missing or incorrect messenger-related types
- [base-controller] Implement utility function `registerActionHandlers` for batch registering all internal actions of a controller class
- [base-controller] Implement utility type `ControllerActionsMap` for generating, storing, exposing internal action types
- Upgrade to TypeScript v5.5
- Fatal Error: Cannot destructure property 'chainId' of 'this.networkController.getNetworkConfigurationByNetworkClientId(...)' as it is undefined.
- [safe-event-emitter-provider] Invalid default params
- Add the new `default` snap dialog approval type to `ApprovalType` HOT 1
- [gas-fee-controller] Cache chains supported by Gas API
- Release [safe-event-emitter-provider] invalid default params fix
- Fix Invalid type assignment in SafeEventEmitterProvider HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.