issue: https://linear.app/comm/issue/ENG-5379/refactor-prerequestuserstateselector
This selector is used to fetch PreRequestUserState. It is being used to be passed into setNewSession, deleteAccount and logOut actions.
setNewSession is always called in the context of one keyserver. logOut and deleteAccount may be called for one keyserver, or for many. PreRequestUserState is alway used for the same thing - invalidSessionDowngrade check (see https://linear.app/comm/issue/ENG-4685/refactor-selectors#comment-539ab029 for more details). So we want to pass into those actions an object of the same shape. But, if an action is called for one keyserver, we want to only include information about that keyserver. That's why I split the selector into two selectors.
invalidSessionDowngrade itself will be updated during https://linear.app/comm/issue/ENG-5351/refactor-web-reducer
Details
Details
Tested that the selectors work. Checked all places where preRequestUserStateSelector was being used and figured out what it was used for, and which of the new selectors needs to be used now
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/selectors/account-selectors.js | ||
---|---|---|
47 ↗ | (On Diff #32816) | Will be removed in the next diff |
lib/types/session-types.js | ||
---|---|---|
92 ↗ | (On Diff #32816) | can this be read-only? |
lib/selectors/account-selectors.js | ||
---|---|---|
45–92 ↗ | (On Diff #32888) | Thank you for typing these selectors! It makes me life easier for the Flow update |