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

Wallet - Bank account subtitle shows undefined after adding bank account #54707

Closed
4 of 8 tasks
IuliiaHerets opened this issue Jan 1, 2025 · 11 comments
Closed
4 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Reviewing Has a PR in review

Comments

@IuliiaHerets
Copy link

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.80-1
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
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: Mac 15.0 / Chrome
App Component: User Settings

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Account settings.
  3. Go to Wallet.
  4. Click Add bank account.
  5. Selected US on Country page.
  6. Proceed to add a US bank account.

Expected Result:

After adding bank account, bank account subtitle will show USD.

Actual Result:

After adding bank account, bank account subtitle shows undefined.
It only shows USD after reloading Wallet page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6704702_1735692446351.20250101_084418.mp4

View all open jobs on GitHub

@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jan 1, 2025
Copy link

melvin-bot bot commented Jan 1, 2025

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

Copy link

melvin-bot bot commented Jan 1, 2025

Triggered auto assignment to @jliexpensify (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 1, 2025

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jan 1, 2025
Copy link
Contributor

github-actions bot commented Jan 1, 2025

👋 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.

@techievivek
Copy link
Contributor

@MonilBhavsar Look like this is related to #52322? Do you mind taking a look here. Thanks.

@parasharrajat
Copy link
Member

parasharrajat commented Jan 1, 2025

Edited by proposal-police: This proposal was edited at 2025-01-01 13:22:33 UTC.

Proposal

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

What is the root cause of that problem?

For bank accounts in US, we don't go through our new international bank account flow which sets the bankCurrency on the account data. It is using old process which does not add bankCurrency. We are using this bank currency to get the description for the payment method.

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

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

  1. We can depend on account.accountData.additionalFields.currency to get currency when backCurrency is not present on bankaccount.
    function getPaymentMethodDescription(accountType: AccountType, account: BankAccount['accountData'] | Fund['accountData'] | ACHAccount, bankCurrency?: string): string {
    if (account) {
    if (accountType === CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT && 'accountNumber' in account) {
    return `${bankCurrency} ${CONST.DOT_SEPARATOR} ${Localize.translateLocal('paymentMethodList.accountLastFour')} ${account.accountNumber?.slice(-4)}`;
    }
    if (accountType === CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT && 'accountNumber' in account) {
    return `${Localize.translateLocal('paymentMethodList.accountLastFour')} ${account.accountNumber?.slice(-4)}`;
    }
    if (accountType === CONST.PAYMENT_METHODS.DEBIT_CARD && 'cardNumber' in account) {
    return `${Localize.translateLocal('paymentMethodList.cardLastFour')} ${account.cardNumber?.slice(-4)}`;
return `${bankCurrency ?? account.accountData?.additionalFields?.currency} ${CONST.DOT_SEPARATOR} ${Localize.translateLocal('paymentMethodList.accountLastFour')} ${account.accountNumber?.slice(-4)}`;
        }

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.

@MonilBhavsar MonilBhavsar self-assigned this Jan 1, 2025
@MonilBhavsar
Copy link
Contributor

I think the real fix here is to have server send bankCurrency when account is created. I'll work on it.

@MonilBhavsar MonilBhavsar added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Jan 1, 2025
@MonilBhavsar
Copy link
Contributor

Not a blocker though

@MonilBhavsar
Copy link
Contributor

Sent PR for review

@techievivek
Copy link
Contributor

Unassigned myself since Monil is already on it.

@MonilBhavsar
Copy link
Contributor

This was fixed, closing

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. Daily KSv2 Engineering Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

5 participants