diff --git a/android/app/build.gradle b/android/app/build.gradle index 5600b6971b7b..51a571a10c0a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -156,8 +156,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001023603 - versionName "1.2.36-3" + versionCode 1001023604 + versionName "1.2.36-4" buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() if (isNewArchitectureEnabled()) { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 1cb734fde960..985d07759945 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -30,7 +30,7 @@ CFBundleVersion - 1.2.36.3 + 1.2.36.4 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 66d60e085b67..6b4f494ff64b 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.2.36.3 + 1.2.36.4 diff --git a/package-lock.json b/package-lock.json index a88652479b69..f23acc9ed36c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.2.36-3", + "version": "1.2.36-4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.2.36-3", + "version": "1.2.36-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 6bd74b59fcb9..875861e8e693 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.2.36-3", + "version": "1.2.36-4", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index bc9a4facd57f..758e00a6fecb 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -779,23 +779,6 @@ function getHeaderMessage(hasSelectableOptions, hasUserToInvite, searchValue, ma return ''; } -/** - * Returns the currency list for sections display - * - * @param {Object} currencyOptions - * @param {String} searchValue - * @returns {Array} - */ -function getCurrencyListForSections(currencyOptions, searchValue) { - const filteredOptions = _.filter(currencyOptions, currencyOption => ( - isSearchStringMatch(searchValue, currencyOption.text))); - - return { - // returns filtered options i.e. options with string match if search text is entered - currencyOptions: filteredOptions, - }; -} - export { addSMSDomainIfPhoneNumber, isCurrentUser, @@ -804,7 +787,6 @@ export { getMemberInviteOptions, getHeaderMessage, getPersonalDetailsForLogins, - getCurrencyListForSections, getIOUConfirmationOptionsFromMyPersonalDetail, getIOUConfirmationOptionsFromParticipants, getSearchText, diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 2621b19ce81f..b7affe898beb 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -3,7 +3,6 @@ import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; import ONYXKEYS from '../../ONYXKEYS'; -import * as OptionsListUtils from '../../libs/OptionsListUtils'; import OptionsSelector from '../../components/OptionsSelector'; import Navigation from '../../libs/Navigation/Navigation'; import ScreenWrapper from '../../components/ScreenWrapper'; @@ -41,11 +40,9 @@ class IOUCurrencySelection extends Component { constructor(props) { super(props); - const {currencyOptions} = OptionsListUtils.getCurrencyListForSections(this.getCurrencyOptions(this.props.currencyList), ''); - this.state = { searchValue: '', - currencyData: currencyOptions, + currencyData: this.getCurrencyOptions(this.props.currencyList), }; this.getCurrencyOptions = this.getCurrencyOptions.bind(this); this.getSections = this.getSections.bind(this); @@ -90,13 +87,13 @@ class IOUCurrencySelection extends Component { * @return {void} */ changeSearchValue(searchValue) { - const {currencyOptions} = OptionsListUtils.getCurrencyListForSections( - this.getCurrencyOptions(this.props.currencyList), - searchValue, - ); + const currencyOptions = this.getCurrencyOptions(this.props.currencyList); + const searchRegex = new RegExp(searchValue, 'i'); + const filteredCurrencies = _.filter(currencyOptions, currencyOption => searchRegex.test(currencyOption.text)); + this.setState({ searchValue, - currencyData: currencyOptions, + currencyData: filteredCurrencies, }); }