Tracking issue: https://github.com/Expensify/Expensify/issues/182122
Problem
Currently we store logins in Onyx as an Array of logins.
As outlined in the N7 Account Settings doc, in the near future we'll need to be able to associate errors / loading states with individual logins (in the future we'll call them "contact methods"). If we keep this data as an array, we aren't able to update individual logins so we'll have to re-set the entire login list any time we add error messages, remove them, set loading states, etc.
Solution
Update the logins in LOGIN_LIST to be an object / dictionary of logins. The keys will be the login (partnerUserID) and the values will be the full login details as they exist today. This will make it very easy to use Onyx to add / modify / remove keys to individual logins.
We'll need to write a migration for this so that any existing user with an array loginList will be converted to an object.
- Note: We agreed no migration is needed for this
Additionally, we'll have to look into our backend to update the format of any API commands returning loginList data. Examples:
Upwork Automation - Do Not Edit
Tracking issue: https://github.com/Expensify/Expensify/issues/182122
Problem
Currently we store logins in Onyx as an Array of logins.
As outlined in the N7 Account Settings doc, in the near future we'll need to be able to associate errors / loading states with individual logins (in the future we'll call them "contact methods"). If we keep this data as an array, we aren't able to update individual logins so we'll have to re-set the entire login list any time we add error messages, remove them, set loading states, etc.
Solution
Update the logins in
LOGIN_LISTto be an object / dictionary of logins. The keys will be the login (partnerUserID) and the values will be the full login details as they exist today. This will make it very easy to use Onyx to add / modify / remove keys to individual logins.We'll need to write a migration for this so that any existing user with an array loginList will be converted to an object.Additionally, we'll have to look into our backend to update the format of any API commands returning loginList data. Examples:
Upwork Automation - Do Not Edit