Skip to content

Commit

Permalink
Refactor service classes to use createServicePolicy
Browse files Browse the repository at this point in the history
A previous commit added a `createServicePolicy` function to
`controller-utils`. This allows us to refactor the following service
classes which make use of a Cockatiel policy by replacing boilerplace
code with a simple function call:

- `CodefiV2` in `assets-controllers`
- `ClientConfigApiService` in `remote-feature-flag-controller`

Note that other service modules that do not yet make use of a Cockatiel
policy have not been updated to use `createServicePolicy`. We would need
to upgrade these areas to use the latest service object pattern we've
established.
  • Loading branch information
mcmire committed Jan 7, 2025
1 parent 627b096 commit 1c790a7
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 1,152 deletions.
1 change: 0 additions & 1 deletion packages/assets-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"@types/uuid": "^8.3.0",
"async-mutex": "^0.5.0",
"bn.js": "^5.2.1",
"cockatiel": "^3.1.2",
"immer": "^9.0.6",
"lodash": "^4.17.21",
"multiformats": "^13.1.0",
Expand Down
Loading

0 comments on commit 1c790a7

Please sign in to comment.