Skip to content

[Due for payment 2025-03-17] [$250] [Due for payment 2025-03-13] [HybridApp] Improve the way of sending data between New and Old apps on mobile #56836

Closed

Description

@war-in

Context

Currently, we use a single string (named url) to pass data from OldDot side to New app when necessary.

{
  "url": "/home?
      email=marcin.warchol+exp.ht@swmansion.com
      &authToken=<REDACTED>
      &accountID=16530855
      &autoGeneratedLogin=<REDACTED>
      &autoGeneratedPassword=<REDACTED>
      &clearOnyxOnStart=false
      &isSingleNewDotEntry=false
      &completedHybridAppOnboarding=true
      &primaryLogin=marcin.warchol+exp.ht@swmansion.com
      &encryptedAuthToken=<REDACTED>"
}

Then on the ND side we need to parse this string to extract each field

const {
    email,
    authToken,
    encryptedAuthToken,
    accountID,
    autoGeneratedLogin,
    autoGeneratedPassword,
    clearOnyxOnStart,
    completedHybridAppOnboarding,
    nudgeMigrationTimestamp,
    isSingleNewDotEntry,
    primaryLogin,
    oldDotOriginalAccountEmail,
} = Object.fromEntries(
    queryParams.split('&').map((param) => {
        const [key, value] = param.split('=');
        return [key, value];
    }),
);

Solution

To improve sending and receiving the data we can organize it as multiple fields and objects. This way we will have nice, typed and structured (easy to read and handle) data.

type HybridAppSettings = {
    email: string;
    authToken: string;
    accountID: number;
    autoGeneratedLogin: string;
    autoGeneratedPassword: string;
    clearOnyxOnStart: boolean;
    completedHybridAppOnboarding: boolean;
    isSingleNewDotEntry: boolean;
    primaryLogin: string;
    encryptedAuthToken: string;
    nudgeMigrationTimestamp?: string;
    oldDotOriginalAccountEmail?: string;
};
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021899160401413253155
  • Upwork Job ID: 1899160401413253155
  • Last Price Increase: 2025-03-17
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @hoangzinh

Activity

  1. war-in commented on Feb 13, 2025

    @war-in
    ContributorAuthor
  2. 45 remaining items

  3. melvin-bot commented on Mar 13, 2025

    @melvin-bot

    @hoangzinh @Julesssss @sonialiap @war-in this issue is now 4 weeks old, please consider:

    • Finding a contributor to fix the bug
    • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
    • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

    Thanks!

  4. hoangzinh commented on Mar 13, 2025

    @hoangzinh
    Contributor

    Not overdue, awaiting the regression period.

  5. sonialiap commented on Mar 13, 2025

    @sonialiap
    Contributor

    As Vinh said, waiting until the 17th

  6. melvin-bot commented on Mar 17, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    • Reviewer: @hoangzinh owed $250 via NewDot
    • Contributor: @war-in is from an agency-contributor and not due payment

    BugZero Checklist (@sonialiap)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1899160401413253155/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  7. melvin-bot commented on Mar 17, 2025

    @melvin-bot

    @sonialiap Whoops! This issue is 2 days overdue. Let's get this updated quick!

  8. sonialiap commented on Mar 17, 2025

    @sonialiap
    Contributor

    Payment summary:

  9. hoangzinh commented on Mar 17, 2025

    @hoangzinh
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other: It's just an improvement issue

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other: Slack

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other: Expert contributor groups
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: No offending PR. It's just an improvement issue

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

      No, It's just an improvement issue

  10. hoangzinh commented on Mar 17, 2025

    @hoangzinh
    Contributor

    Requested payment in ND

  11. melvin-bot commented on Mar 17, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  12. sonialiap commented on Mar 18, 2025

    @sonialiap
    Contributor

    No regression test needed, closing out

  13. garrettmknight commented on Mar 21, 2025

    @garrettmknight
    Contributor

    $250 approved for @hoangzinh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsImprovementItem broken or needs improvement.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions