Skip to content

[Due for payment 2025-10-17][$250] BNP - Minus sign display is inconsistent consistent when navigating back from scan tab #64927

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.1.71-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch app in both mweb and app with a new gmail account & perform below steps
  2. Tap fab create expense
  3. Tap flip to add minus sign
  4. Enter an amount
  5. Tap scan - try it out
  6. Tap app top back arrow - manual

Expected Result:

In mweb & android, minus sign display must be consistent when navigating back from scan tab

Actual Result:

In mweb, minus sign is not shown but in android minus sign is displayed when navigating back from scan tab

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6869543_1750857136024.Screenrecorder-2025-06-25-18-36-41-368.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021938297793877439425
  • Upwork Job ID: 1938297793877439425
  • Last Price Increase: 2025-06-26
  • Automatic offers:
    • Krishna2323 | Contributor | 107866433
Issue OwnerCurrent Issue Owner: @NicMendonca

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 25, 2025
  2. melvin-bot commented on Jun 25, 2025

    @melvin-bot

    Triggered auto assignment to @NicMendonca (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. Krishna2323 commented on Jun 25, 2025

    @Krishna2323
    Contributor

    Proposal

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

    BNP - Minus sign display is inconsistent consistent when navigating back from scan tab

    What is the root cause of that problem?

    • When the IOU type is changed (tab change), the isNegative state is not re-initialized.
      useEffect(() => {
      if (!currency || typeof amount !== 'number') {
      return;
      }
      initializeAmount(amount);
      // we want to re-initialize the state only when the selected tab
      // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
      }, [selectedTab]);

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

    • We should set isNegative to false when selectedTab is changed.
        useEffect(() => {
            if (!currency || typeof absoluteAmount !== 'number') {
                return;
            }
            initializeAmount(absoluteAmount);
             setIsNegative(false);
            // we want to re-initialize the state only when the selected tab
            // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
        }, [selectedTab]);

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

    N/A

    What alternative solutions did you explore? (Optional)

    Result

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 26, 2025
  5. changed the title [-]BNP - Minus sign display is inconsistent consistent when navigating back from scan tab[/-] [+][$250] BNP - Minus sign display is inconsistent consistent when navigating back from scan tab[/+] on Jun 26, 2025
  6. melvin-bot commented on Jun 26, 2025

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

    @melvin-bot

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

  9. melvin-bot commented on Jun 30, 2025

    @melvin-bot

    @Ollyws Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  10. Ollyws commented on Jun 30, 2025

    @Ollyws
    Contributor

    @Krishna2323's proposal LGTM.
    🎀👀🎀 C+ reviewed

  11. 40 remaining items

  12. Krishna2323 commented on Oct 16, 2025

    @Krishna2323
    Contributor

    @luacmartins @NicMendonca this issue if fixed on main, I think we can now proceed to the payments here.

    Monosnap.screencast.2025-10-17.01-31-50.mp4
  13. changed the title [-][$250] BNP - Minus sign display is inconsistent consistent when navigating back from scan tab[/-] [+][Due for payment 2025-10-17][$250] BNP - Minus sign display is inconsistent consistent when navigating back from scan tab[/+] on Oct 17, 2025
  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed
    ReviewingHas a PR in review
    on Oct 17, 2025
  15. NicMendonca commented on Oct 20, 2025

    @NicMendonca
    Contributor

    Payment Summary

    Contributor: @Krishna2323 paid $250 via NewDot
    Contributor+: @Ollyws due $250 via NewDot

  16. Ollyws commented on Oct 23, 2025

    @Ollyws
    Contributor

    Requested on ND.

  17. Krishna2323 commented on Oct 30, 2025

    @Krishna2323
    Contributor

    Requested in ND.

  18. quinthar commented on Nov 2, 2025

    @quinthar
    Contributor

    $250 approved to @Ollyws

  19. JmillsExpensify commented on Nov 3, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @Krishna2323

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions