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

Make BaseController state immutable #3

Closed
bitpshr opened this issue Jun 29, 2018 · 1 comment
Closed

Make BaseController state immutable #3

bitpshr opened this issue Jun 29, 2018 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bitpshr
Copy link
Contributor

bitpshr commented Jun 29, 2018

The state member variable exposed by the BaseController is mutable and can be modified externally. Direct state modification shouldn't be allowed since it bypasses notification. The state variable should be made readonly so that it's immutable and can only be modified by calling update or an exposed API method that modifies state internally.

@bitpshr bitpshr added enhancement New feature or request good first issue Good for newcomers labels Jun 29, 2018
@Gudahtt
Copy link
Member

Gudahtt commented Nov 4, 2021

This is covered by the new controller API

@Gudahtt Gudahtt closed this as completed Nov 4, 2021
mcmire pushed a commit that referenced this issue Jul 17, 2023
The initial implementation of this package, with some basic utilities and tests. We have three categories of utilities to start with:
- JSON- and JSON-RPC-related, with functions like `isValidJson` and `isJsonRpcSuccess`
- Time-related, which currently only has one utility, `timeSince`, which returns the time elapsed since the specified Unix epoch
- Miscellaneous, which includes various type guards and `hasProperty`, which is an alias for `Object.hasOwnProperty`
MajorLift pushed a commit that referenced this issue Sep 22, 2023
Bumps [@metamask/eslint-config-typescript](https://github.com/MetaMask/eslint-config) from 11.0.2 to 11.1.0.
- [Release notes](https://github.com/MetaMask/eslint-config/releases)
- [Commits](MetaMask/eslint-config@v11.0.2...v11.1.0)

---
updated-dependencies:
- dependency-name: "@metamask/eslint-config-typescript"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants