Should fix ENG-3840 (landing not working). The issue was a circular dependecy after adding validators. Moves session related functions out of account-utils and into session-utils
Details
- Reviewers
tomek ginsu - Commits
- rCOMM9fe00ff08cab: [lib] Fix circular dependency
Check if web and landing work.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
The code looks good, but I actually pitched this idea to @ashoat initially and we talked about finding another solution. Thinking out lout right now, but wouldn't it be possible to decouple this cycle by moving defaultNotificationPayloadValidator out of account-types and possibly into validation-utils? I think this would also be better since there are no other validators in account-utils and account-utils should exclusively just be for types
My high-level view is that it would be better to keep account-utils.js as a "leaf", and just extract the one function that is preventing account-utils.js from being a leaf, than to extract all of the other stuff into a new leaf
Instead of extracting the regexes, instead move the session functions. Only invalidSessionRecovery had to be moved but I moved both of them to keep them together, I can move invalidSessionDowngrade back if that's prefered.
defaultNotificationPayloadValidator out of account-types and possibly into validation-utils
I would prefer to keep as much validators near their flow definitions so people don't change one without changing the other
lgtm thanks for fixing this!
Only invalidSessionRecovery had to be moved but I moved both of them to keep them together,
this makes sense