You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for Payment 2026-05-18] [$250] Android - Workspace - Currency symbol disappear for some currencies after selecting different currency #76996
Please re-state the problem that we are trying to solve in this issue.
In the Android app, when selecting a default currency in workspace settings, currency symbols disappear for certain currencies (AFN, ALL, ANG, AWG, VND, XOF, XAF) after selecting a different currency and then reopening the currency selection list.
What is the root cause of that problem?
The CurrencySelectionList component uses getCurrencySymbol() function from CurrencyUtils.ts to retrieve currency symbols. This function relies on a module-level currencyList variable that is updated via an Onyx connection callback.
However, the component also uses useOnyx hook to get the currencyList directly. When a currency is selected and the component re-renders, there's a timing issue where:
The useMemo hook recalculates the currency options using the currencyList from useOnyx
But getCurrencySymbol() accesses the module-level currencyList variable which may be stale or not yet synchronized
This causes getCurrencySymbol() to return undefined for some currencies, resulting in missing symbols
The root cause is a mismatch between the reactive currencyList from useOnyx hook and the module-level cached currencyList used by getCurrencySymbol(). After a currency selection triggers a re-render, the module-level cache may not be immediately updated, causing symbols to disappear.
What changes do you think we should make in order to solve the problem?
Replace the getCurrencySymbol() function calls with direct access to the currencyList from the useOnyx hook in the CurrencySelectionList component. This ensures we're always using the most up-to-date currency data that's already available in the component.
Please re-state the problem that we are trying to solve in this issue.
Currency symbol disappear for some currencies (AFN, ALL< ANG, AWG, VND, XOF, XAF) after selecting different currency
What is the root cause of that problem?
It is due to Onyx Data Synchronization Race Condition. The components were calling getCurrencySymbol(currencyCode) which relies on a module-level variable (currencyList) in CurrencyUtils.ts that is populated via a separate Onyx connection
What alternative solutions did you explore? (Optional)
We should subscribe to ONYXKEYS.CURRENCY_LIST using useOnyx, then pass data from parent component to getCurrencySymbol function
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.
changed the title [-]Android - Workspace - Currency symbol disappear for some currencies after selecting different currency[/-][+][$250] Android - Workspace - Currency symbol disappear for some currencies after selecting different currency[/+]on Dec 12, 2025
Can we ask the QA team to test this issue again? I can't reproduce this bug on the latest main branch.
It seems that the bug was fixed using a similar approach to the one I suggested, specifically by completely removing isMultilineSupported from the SelectionList component:
Meanwhile, in my proposal, I suggested setting the isRowMultilineSupported value to false (which is equivalent to no value) for the currency list, and keeping the existing logic for everything else to avoid breaking anything.
And in this PR, this value is already set to false by default, which means that the line is no longer considered multiline, so the bug doesn’t reproduce: #83561
@abzokhattab You want to be paid via Upwork or NewDot? Looks like you were hired in Upwork, your eligibility date was last year so we can pay via NewDot if you prefer. $125 cuz you didn't do tests on the PR.
changed the title [-][HOLD FOR #76531] [$250] Android - Workspace - Currency symbol disappear for some currencies after selecting different currency[/-][+][Due for Payment 2026-05-18] [$250] Android - Workspace - Currency symbol disappear for some currencies after selecting different currency[/+]on May 19, 2026
Activity
melvin-bot commentedon Dec 8, 2025
Triggered auto assignment to @lydiabarclay (
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.abbasifaizan70 commentedon Dec 8, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the Android app, when selecting a default currency in workspace settings, currency symbols disappear for certain currencies (AFN, ALL, ANG, AWG, VND, XOF, XAF) after selecting a different currency and then reopening the currency selection list.
What is the root cause of that problem?
The
CurrencySelectionListcomponent usesgetCurrencySymbol()function fromCurrencyUtils.tsto retrieve currency symbols. This function relies on a module-levelcurrencyListvariable that is updated via an Onyx connection callback.However, the component also uses
useOnyxhook to get thecurrencyListdirectly. When a currency is selected and the component re-renders, there's a timing issue where:useMemohook recalculates the currency options using thecurrencyListfromuseOnyxgetCurrencySymbol()accesses the module-levelcurrencyListvariable which may be stale or not yet synchronizedgetCurrencySymbol()to returnundefinedfor some currencies, resulting in missing symbolsThe root cause is a mismatch between the reactive
currencyListfromuseOnyxhook and the module-level cachedcurrencyListused bygetCurrencySymbol(). After a currency selection triggers a re-render, the module-level cache may not be immediately updated, causing symbols to disappear.What changes do you think we should make in order to solve the problem?
Replace the
getCurrencySymbol()function calls with direct access to thecurrencyListfrom theuseOnyxhook in theCurrencySelectionListcomponent. This ensures we're always using the most up-to-date currency data that's already available in the component.File:
App/src/components/CurrencySelectionList/index.tsxRemove the import of
getCurrencySymbol:import {getCurrencySymbol} from '@libs/CurrencyUtils';Update the currency options mapping to use
currencyInfo?.symboldirectly:text: \${currencyCode} - ${getCurrencySymbol(currencyCode)}``text: \${currencyCode} - ${currencyInfo?.symbol ?? ''}``Update the recently used currencies mapping similarly:
text: \${currencyCode} - ${getCurrencySymbol(currencyCode)}``text: \${currencyCode} - ${currencyInfo?.symbol ?? ''}``Why this works:
currencyListdata that's already available in the component viauseOnyx, ensuring consistencycurrencyListfromuseOnyxis automatically updated when Onyx data changes, so symbols will always reflect the current statecurrencyListandcurrencyInfo, so this is just using the data more directlyWhat alternative solutions did you explore? (Optional)
None
lorretheboy commentedon Dec 8, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Currency symbol disappear for some currencies (AFN, ALL< ANG, AWG, VND, XOF, XAF) after selecting different currency
What is the root cause of that problem?
It is due to Onyx Data Synchronization Race Condition. The components were calling getCurrencySymbol(currencyCode) which relies on a module-level variable (currencyList) in CurrencyUtils.ts that is populated via a separate Onyx connection
App/src/libs/CurrencyUtils.ts
Lines 9 to 20 in 07dd8ea
What changes do you think we should make in order to solve the problem?
We should update to use direct data from currency
App/src/libs/SearchUIUtils.ts
Line 2453 in 02b3c81
import useOnyx from '@hooks/useOnyx'; import useThemeStyles from '@hooks/useThemeStyles'; import {updateAdvancedFilters} from '@libs/actions/Search'; -import {getCurrencySymbol} from '@libs/CurrencyUtils'; import Navigation from '@libs/Navigation/Navigation'; import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -39,16 +38,18 @@ function SearchFiltersCurrencyBase({title, filterKey, multiselect = false}: Sear continue; } + const currencySymbol = currencyList?.[currencyCode]?.symbol ?? ''; + if (Array.isArray(selectedCurrencyData) && selectedCurrencyData?.includes(currencyCode) && !selectedCurrencies.some((currencyItem) => currencyItem.value === currencyCode)) { - selectedCurrencies.push({name: `${currencyCode} - ${getCurrencySymbol(currencyCode)}`, value: currencyCode}); + selectedCurrencies.push({name: `${currencyCode} - ${currencySymbol}`, value: currencyCode}); } if (!Array.isArray(selectedCurrencyData) && selectedCurrencyData === currencyCode) { - selectedCurrencies.push({name: `${currencyCode} - ${getCurrencySymbol(currencyCode)}`, value: currencyCode}); + selectedCurrencies.push({name: `${currencyCode} - ${currencySymbol}`, value: currencyCode}); } if (!currencies.some((item) => item.value === currencyCode)) { - currencies.push({name: `${currencyCode} - ${getCurrencySymbol(currencyCode)}`, value: currencyCode}); + currencies.push({name: `${currencyCode} - ${currencySymbol}`, value: currencyCode}); } }App/src/components/Search/SearchFiltersCurrencyBase.tsx
Line 26 in 6abc35a
App/src/components/CurrencySelectionList/index.tsx
Line 14 in fa5e06d
What alternative solutions did you explore? (Optional)
We should subscribe to
ONYXKEYS.CURRENCY_LISTusinguseOnyx, then pass data from parent component togetCurrencySymbolfunctionReminder: 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.
melvin-bot commentedon Dec 12, 2025
@lydiabarclay Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
[-]Android - Workspace - Currency symbol disappear for some currencies after selecting different currency[/-][+][$250] Android - Workspace - Currency symbol disappear for some currencies after selecting different currency[/+]melvin-bot commentedon Dec 12, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021999574703930541403
melvin-bot commentedon Dec 12, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abzokhattab (
External)63 remaining items
Eskalifer1 commentedon May 11, 2026
Hi everyone!
Can we ask the QA team to test this issue again? I can't reproduce this bug on the latest main branch.
It seems that the bug was fixed using a similar approach to the one I suggested, specifically by completely removing
isMultilineSupportedfrom theSelectionListcomponent:App/src/components/SelectionList/SelectionListWithSections/index.native.tsx
Lines 6 to 15 in 99d1127
Meanwhile, in my proposal, I suggested setting the
isRowMultilineSupportedvalue to false (which is equivalent to no value) for the currency list, and keeping the existing logic for everything else to avoid breaking anything.And in this PR, this value is already set to
falseby default, which means that the line is no longer considered multiline, so the bug doesn’t reproduce:#83561
cc: @mallenexpensify @abzokhattab @srikarparsi
mallenexpensify commentedon May 12, 2026
retest requested
m-natarajan commentedon May 13, 2026
Issue not reproducible using build v9.3.70-6
2026-05-13.7.33.35.AM.mp4
Eskalifer1 commentedon May 14, 2026
Hi @mallenexpensify we are good to pay and close here!
mallenexpensify commentedon May 19, 2026
Payment Summary
Contributor: @Eskalifer1 paid $250 via Upwork
Contributor+: @abzokhattab due $125 Newdot.
@Eskalifer1 can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~021999574703930541403
@abzokhattab You want to be paid via Upwork or NewDot? Looks like you were hired in Upwork, your eligibility date was last year so we can pay via NewDot if you prefer. $125 cuz you didn't do tests on the PR.
For edge cases, please provide more details, it can take a while to look through issues and PRs.
[-][HOLD FOR #76531] [$250] Android - Workspace - Currency symbol disappear for some currencies after selecting different currency[/-][+][Due for Payment 2026-05-18] [$250] Android - Workspace - Currency symbol disappear for some currencies after selecting different currency[/+]abzokhattab commentedon May 20, 2026
Thanks Matt @mallenexpensify ... i would prefer to receive it on newdot
mallenexpensify commentedon May 20, 2026
@Eskalifer1 and @abzokhattab paid, summary updated above. Thx.
quinthar commentedon Jun 13, 2026
Approved $125 to @abzokhattab