Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoices - Bank account pop-up shows "undefined" instead of the bank currency #55675

Open
6 of 8 tasks
IuliiaHerets opened this issue Jan 23, 2025 · 14 comments
Open
6 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Jan 23, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.89-2
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, repro on both
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.2
App Component: Workspace Settings

Action Performed:

Precondition:

  • User has added a bank account (US or any country) in Invoices page.
  1. Launch ND or hybrid app.
  2. Go to workspace settings > Invoices.
  3. Tap on the bank account row.

Expected Result:

The pop-up will show the bank currency.

Actual Result:

The pop-up shows "undefined" instead of the bank currency.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6722183_1737667199659.ScreenRecording_01-24-2025_05-16-37_1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @shubham1206agra
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment labels Jan 23, 2025
Copy link

melvin-bot bot commented Jan 23, 2025

Triggered auto assignment to @aldo-expensify (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Jan 23, 2025

Triggered auto assignment to @abekkala (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.

Copy link

melvin-bot bot commented Jan 23, 2025

💬 A slack conversation has been started in #expensify-open-source

@melvin-bot melvin-bot bot added the Daily KSv2 label Jan 23, 2025
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jan 23, 2025
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@mkzie2
Copy link
Contributor

mkzie2 commented Jan 24, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-01-24 01:29:00 UTC.

Proposal

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

The pop-up shows "undefined" instead of the bank currency.

What is the root cause of that problem?

We do not pass the account currency to generate description here:

description: PaymentUtils.getPaymentMethodDescription(accountType, account),

causing it to be undefined:

if (accountType === CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT && 'accountNumber' in account) {
return `${bankCurrency} ${CONST.DOT_SEPARATOR} ${translateLocal('paymentMethodList.accountLastFour')} ${account.accountNumber?.slice(-4)}`;
}

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

Pass account?.additionalData?.currency as bankCurrency:

if (accountType === CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT && 'accountNumber' in account) {
return `${bankCurrency} ${CONST.DOT_SEPARATOR} ${translateLocal('paymentMethodList.accountLastFour')} ${account.accountNumber?.slice(-4)}`;
}

We should check other places using getPaymentMethodDescription to see if there're similar issues and pass currency accordingly.

1 simple improvement is we can only show the account currency if it exists:

if (accountType === CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT && 'accountNumber' in account) {
return `${bankCurrency} ${CONST.DOT_SEPARATOR} ${translateLocal('paymentMethodList.accountLastFour')} ${account.accountNumber?.slice(-4)}`;
}

`${bankCurrency? `${bankCurrency} ${CONST.DOT_SEPARATOR} ` : ''}${translateLocal('paymentMethodList.accountLastFour')} ${account.accountNumber?.slice(-4)}`

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)

NA

Copy link

melvin-bot bot commented Jan 24, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@Beamanator
Copy link
Contributor

@MonilBhavsar @shubham1206agra @DylanDylann is this NAB b/c of the same beta as #55672 (comment)?

@shubham1206agra
Copy link
Contributor

@Beamanator This is a BE bug. Can you mark this internal?

@MonilBhavsar MonilBhavsar self-assigned this Jan 24, 2025
@MonilBhavsar MonilBhavsar added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 24, 2025
@MonilBhavsar
Copy link
Contributor

Feature is under beta, so not a blocker. I'll take a look

Copy link

melvin-bot bot commented Jan 28, 2025

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

@MonilBhavsar
Copy link
Contributor

Working on this today

@melvin-bot melvin-bot bot removed the Overdue label Jan 28, 2025
@MonilBhavsar
Copy link
Contributor

@shubham1206agra this looks client side bug

Copy link

melvin-bot bot commented Feb 3, 2025

@abekkala, @MonilBhavsar, @shubham1206agra Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Feb 3, 2025
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Feb 3, 2025
@DylanDylann
Copy link
Contributor

@shubham1206agra As mentioned here, I think we can combine @mkzie2 's idea in the PR It will help us prevent similar bugs in other cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants