You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A constant called controllerName exists which holds the name of the controller.
A constant called controllerMetadata exists which holds the metadata for the state.
The default state object is wrapped in a function called getDefaultAlertControllerState.
AlertController inherits from BaseController.
The AlertController constructor signature is updated to take a partial state (instead of initState) and messenger (instead of controllerMessenger).
The AlertController constructor is updated to super to the superclass.
AlertController uses this.messagingSystem to refer to the messenger.
this.state is used to access state instead of this.store.getState.
this.update is used to update state instead of this.store.updateState.
Supporting types exist.
The AlertControllerState type exists and represents the current shape of the state object.
The AlertControllerGetStateAction and AlertControllerStateChangeEvent types exist.
The AlertControllerActions and AlertControllerEvents types exist.
The AllowedActions and AllowedEvents types exist.
The AlertControllerMessenger type exists and expects AccountsController:getSelectedAccount and AccountsController:selectedAccountChange to be allowed.
The functionality supported by this controller still works. (There are no tests for this controller, so that may have to be checked manually.)
Stakeholder review needed before the work gets merged
Engineering (needed in most cases)
Design
Product
QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
The text was updated successfully, but these errors were encountered:
mcmire
changed the title
Convert AlertController to TypeScript, and migrate to BaseController v2
Migrate AlertController to BaseController v2
Jul 18, 2024
What is this about?
Following the Wallet Framework team's OKRs for Q3 2024, we want to bring
AlertController
up to date with our latest controller patterns.Scenario
No response
Design
No response
Technical Details
No response
Threat Modeling Framework
No response
Acceptance Criteria
controllerName
exists which holds the name of the controller.controllerMetadata
exists which holds the metadata for the state.getDefaultAlertControllerState
.AlertController
inherits fromBaseController
.AlertController
constructor signature is updated to take a partialstate
(instead ofinitState
) andmessenger
(instead ofcontrollerMessenger
).AlertController
constructor is updated tosuper
to the superclass.AlertController
usesthis.messagingSystem
to refer to the messenger.this.state
is used to access state instead ofthis.store.getState
.this.update
is used to update state instead ofthis.store.updateState
.AlertControllerState
type exists and represents the current shape of the state object.AlertControllerGetStateAction
andAlertControllerStateChangeEvent
types exist.AlertControllerActions
andAlertControllerEvents
types exist.AllowedActions
andAllowedEvents
types exist.AlertControllerMessenger
type exists and expectsAccountsController:getSelectedAccount
andAccountsController:selectedAccountChange
to be allowed.Stakeholder review needed before the work gets merged
References
The text was updated successfully, but these errors were encountered: