@@ -4,11 +4,11 @@ import CurrencySelectionList from '@components/CurrencySelectionList';
44import type { CurrencyListItem } from '@components/CurrencySelectionList/types' ;
55import useLocalize from '@hooks/useLocalize' ;
66import useOnyx from '@hooks/useOnyx' ;
7- import * as CurrencyUtils from '@libs/CurrencyUtils' ;
7+ import { isValidCurrencyCode } from '@libs/CurrencyUtils' ;
88import Navigation from '@libs/Navigation/Navigation' ;
99import { getTransactionDetails } from '@libs/ReportUtils' ;
1010import { appendParam } from '@libs/Url' ;
11- import * as IOU from '@userActions/IOU' ;
11+ import { setMoneyRequestCurrency } from '@userActions/IOU' ;
1212import CONST from '@src/CONST' ;
1313import ONYXKEYS from '@src/ONYXKEYS' ;
1414import type SCREENS from '@src/SCREENS' ;
@@ -24,10 +24,10 @@ function IOURequestStepCurrency({
2424 } ,
2525} : IOURequestStepCurrencyProps ) {
2626 const { translate} = useLocalize ( ) ;
27- const [ draftTransaction ] = useOnyx ( `${ ONYXKEYS . COLLECTION . TRANSACTION_DRAFT } ${ transactionID ?? - 1 } ` , { canBeMissing : true } ) ;
27+ const [ draftTransaction ] = useOnyx ( `${ ONYXKEYS . COLLECTION . TRANSACTION_DRAFT } ${ transactionID } ` , { canBeMissing : true } ) ;
2828 const [ recentlyUsedCurrencies ] = useOnyx ( ONYXKEYS . RECENTLY_USED_CURRENCIES , { canBeMissing : true } ) ;
2929 const { currency : originalCurrency = '' } = getTransactionDetails ( draftTransaction ) ?? { } ;
30- const currency = CurrencyUtils . isValidCurrencyCode ( selectedCurrency ) ? selectedCurrency : originalCurrency ;
30+ const currency = isValidCurrencyCode ( selectedCurrency ) ? selectedCurrency : originalCurrency ;
3131
3232 const navigateBack = ( selectedCurrencyValue = '' ) => {
3333 // If the currency selection was done from the confirmation step (eg. + > submit expense > manual > confirm > amount > currency)
@@ -48,7 +48,7 @@ function IOURequestStepCurrency({
4848 const confirmCurrencySelection = ( option : CurrencyListItem ) => {
4949 Keyboard . dismiss ( ) ;
5050 if ( pageIndex !== CONST . IOU . PAGE_INDEX . CONFIRM ) {
51- IOU . setMoneyRequestCurrency ( transactionID , option . currencyCode , action === CONST . IOU . ACTION . EDIT ) ;
51+ setMoneyRequestCurrency ( transactionID , option . currencyCode , action === CONST . IOU . ACTION . EDIT ) ;
5252 }
5353
5454 Navigation . setNavigationActionToMicrotaskQueue ( ( ) => navigateBack ( option . currencyCode ) ) ;
0 commit comments