Skip to content

[Due for payment 2025-08-15] [Due for payment 2025-07-28] [$250] Remove remaining withOnyx HOCs from the project | Batch 6 #65967

Description

@fabioh8010

Parent issue: #64225

Let's refactor the following files to use useOnyx instead of withOnyx. All the work must be done in one PR.

After refactor please test them extensively and provide test steps in your PR. In case of questions please ask in #expensify-open-source channel.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021944840343036134470
  • Upwork Job ID: 1944840343036134470
  • Last Price Increase: 2025-07-14
  • Automatic offers:
    • thelullabyy | Contributor | 108043533
Issue OwnerCurrent Issue Owner: @NicMendonca

Activity

  1. thelullabyy commented on Jul 14, 2025

    @thelullabyy
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Remove remaining withOnyx HOCs

    What is the root cause of that problem?

    What changes do you think we should make in order to solve the problem?

    Update these places to use the useOnyx hook and remove withOnyx HOCs

    const [credentials] = useOnyx(ONYXKEYS.CREDENTIALS, {canBeMissing: true});
    

    export default withOnyx<ChangeExpensifyLoginLinkProps, ChangeExpensifyLoginLinkOnyxProps>({
    credentials: {
    key: ONYXKEYS.CREDENTIALS,

    const [credentials] = useOnyx(ONYXKEYS.CREDENTIALS, {canBeMissing: true});
    const [account] = useOnyx(ONYXKEYS.ACCOUNT, {canBeMissing: true});
    

    export default withOnyx<ChooseSSOOrMagicCodeProps, ChooseSSOOrMagicCodeOnyxProps>({
    credentials: {key: ONYXKEYS.CREDENTIALS},
    account: {key: ONYXKEYS.ACCOUNT},
    })(ChooseSSOOrMagicCode);

    const [account] = useOnyx(ONYXKEYS.ACCOUNT, {canBeMissing: true});
    

    export default withOnyx<ThirdPartySignInPageProps, ThirdPartySignInPageOnyxProps>({
    account: {
    key: ONYXKEYS.ACCOUNT,
    },

    const [account] = useOnyx(ONYXKEYS.ACCOUNT, {canBeMissing: true});
    

    export default withOnyx<UnlinkLoginPageProps, UnlinkLoginPageOnyxProps>({
    account: {key: ONYXKEYS.ACCOUNT},
    })(UnlinkLoginPage);

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    NA

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  2. self-assigned this
    on Jul 14, 2025
  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 14, 2025
  4. changed the title [-]Remove remaining withOnyx HOCs from the project | Batch 6[/-] [+][$250] Remove remaining withOnyx HOCs from the project | Batch 6[/+] on Jul 14, 2025
  5. melvin-bot commented on Jul 14, 2025

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 14, 2025
  7. melvin-bot commented on Jul 14, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External)

  8. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 14, 2025
  9. melvin-bot commented on Jul 14, 2025

    @melvin-bot

    📣 @thelullabyy 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

    Offer link
    Upwork job
    Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Keep in mind: Code of Conduct | Contributing 📖

  10. added
    ReviewingHas a PR in review
    and removed on Jul 15, 2025
  11. 16 remaining items

  12. melvin-bot commented on Jul 28, 2025

    @melvin-bot

    Issue is ready for payment but no BZ is assigned. @NicMendonca you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

  13. NicMendonca commented on Jul 31, 2025

    @NicMendonca
    Contributor

    Payment summary

    Contributor+: @@ishpaul777 - Paid $250 via NewDot
    Contributor: @thelullabyy - Paid $250 via Upwork (done ✅ )

  14. added
    ReviewingHas a PR in review
    and removed on Aug 4, 2025
  15. thelullabyy commented on Aug 4, 2025

    @thelullabyy
    Contributor

    @ishpaul777 Follow up PR is up. Please help check, thanks

    #67733

  16. changed the title [-][Due for payment 2025-07-28] [$250] Remove remaining withOnyx HOCs from the project | Batch 6[/-] [+][Due for payment 2025-08-15] [Due for payment 2025-07-28] [$250] Remove remaining withOnyx HOCs from the project | Batch 6[/+] on Aug 8, 2025
  17. melvin-bot commented on Aug 8, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  18. melvin-bot commented on Aug 8, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.90-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-08-15. 🎊

    For reference, here are some details about the assignees on this issue:

  19. twisterdotcom commented on Aug 11, 2025

    @twisterdotcom
    Contributor

    @ishpaul777 has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-7fab-a6a6-a261-662d8ccb8321
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 productionExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions