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 - Excluded countries and their currencies are shown #54741

Open
4 of 8 tasks
IuliiaHerets opened this issue Jan 2, 2025 · 8 comments
Open
4 of 8 tasks

Wallet - Excluded countries and their currencies are shown #54741

IuliiaHerets opened this issue Jan 2, 2025 · 8 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Overdue

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Jan 2, 2025

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: v9.0.80-2
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: #52322
Email or phone of affected tester (no customers): dave0123seife@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 14.5/ Chrome
App Component: User Settings

Action Performed:

  1. Login to NewDot.
  2. Go to Settings > Wallet > Add bank account.
  3. Click Add bank account.
  4. Notice you are able to select excluded countries like Iran, Cuba, Syria, Ukraine, North Korea
  5. Click Next.
  6. Go to currency selector page.
    Notice IRR, SYP, KPW, CUP, and UAH currencies are shown

Based on Step 4 and 13 on the QA Document
Iran, Cuba, Syria, Ukraine, North Korea are not shown in country selector page and IRR, SYP, KPW, CUP, and UAH currencies are not shown in the currency selector page

Expected Result:

Iran, Cuba, Syria, Ukraine, North Korea are not shown in country selector page and IRR, SYP, KPW, CUP, and UAH currencies are not shown in the currency selector page

Actual Result:

Iran, Cuba, Syria, Ukraine, North Korea are shown in country selector page and IRR, SYP, KPW, CUP, and UAH currencies are shown in the currency selector 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

Bug6704920_1735783957336.Screen_Recording_2025-01-02_at_5.03.20_at_night.mp4

View all open jobs on GitHub

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

melvin-bot bot commented Jan 2, 2025

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

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Jan 2, 2025
Copy link

melvin-bot bot commented Jan 2, 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 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 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.

@laurenreidexpensify
Copy link
Contributor

@madmax330 I don't think this is a real deploy blocker right?

@Beamanator
Copy link
Contributor

Agreed 👍 I will help demote

@Beamanator Beamanator added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 2, 2025
@Tony-MK
Copy link
Contributor

Tony-MK commented Jan 3, 2025

Proposal

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

Wallet - Excluded countries and their currencies are shown

What is the root cause of that problem?

The CountrySelection uses of the avaibale countries from CONST.ALL_COUNTRIES.

const countries = useMemo(
() =>
Object.keys(CONST.ALL_COUNTRIES).map((countryISO) => {
const countryName = translate(`allCountries.${countryISO}` as TranslationPaths);
return {
value: countryISO,
keyForList: countryISO,
text: countryName,
isSelected: currentCountry === countryISO,
searchValue: StringUtils.sanitizeString(`${countryISO}${countryName}`),
};
}),
[translate, currentCountry],
);

Also, the BankAccountDetails uses the CurrencyPicker component which doesn't filter out any currencies and displays all available currencies.

<CurrencyPicker
value={formValues.bankCurrency}
onInputChange={onCurrencySelected}

const {sections, headerMessage} = useMemo(() => {
const currencyOptions: CurrencyListItem[] = Object.entries(currencyList ?? {}).reduce((acc, [currencyCode, currencyInfo]) => {
const isSelectedCurrency = currencyCode === initiallySelectedCurrencyCode || selectedCurrencies.includes(currencyCode);

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

Let's, create a constant array of countries to exclude, called CONST.EXCLUDED_COUNTRIES.

  1. Filter out the countries which should be excluded from CONST.ALL_COUNTRIES over here.
Object.keys(CONST.ALL_COUNTRIES).filter((currency) => !CONST.EXCLUDED_COUNTRIES.include(currency)).map((countryISO) => { 
  1. To fix the currency issue, we should exclude the currencies in CurrencySelectionList by creating a prop called excludeCurrencies, which will take in CONST.EXCLUDED_COUNTRIES as an argument, and filter out any currencies before the sections have been made just like the countries issue.

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

What alternative solutions did you explore? (Optional)

Alternatively, create a new array that doesn't include any of the excluded countries and replace it with CONST.ALL_COUNTRIES.

Object.keys(CONST.BANK_ACCOUNT_COUNTRIES).map((countryISO) => { 

@shubham1206agra
Copy link
Contributor

Screenshot 2025-01-04 at 7 38 06 PM

@MonilBhavsar @joekaufmanexpensify The list looks incomplete here. I am going to include Russia for now. Let me know if we need to make some changes here.

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 Overdue
Projects
None yet
Development

No branches or pull requests

6 participants