Skip to content

[$1000] [HOLD for payment 2022-12-02] [N7 Account Settings] Convert LOGIN_LIST from Array to Object #10960

Description

@Beamanator

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staffReviewingHas a PR in review

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions