diff --git a/android/app/build.gradle b/android/app/build.gradle index b1476e387479..db40e1537e52 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -148,8 +148,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001006604 - versionName "1.0.66-4" + versionCode 1001006605 + versionName "1.0.66-5" } splits { abi { diff --git a/ios/ExpensifyCash/Info.plist b/ios/ExpensifyCash/Info.plist index fa0dbed6d62b..5420ad9ae1eb 100644 --- a/ios/ExpensifyCash/Info.plist +++ b/ios/ExpensifyCash/Info.plist @@ -30,7 +30,7 @@ CFBundleVersion - 1.0.66.4 + 1.0.66.5 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/ExpensifyCashTests/Info.plist b/ios/ExpensifyCashTests/Info.plist index 2668ec6f448d..eee15df15375 100644 --- a/ios/ExpensifyCashTests/Info.plist +++ b/ios/ExpensifyCashTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.0.66.4 + 1.0.66.5 diff --git a/package-lock.json b/package-lock.json index 50f74dc083d8..6216280967b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "expensify.cash", - "version": "1.0.66-4", + "version": "1.0.66-5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ac03a46e51ea..c63abaee41cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "expensify.cash", - "version": "1.0.66-4", + "version": "1.0.66-5", "author": "Expensify, Inc.", "homepage": "https://expensify.cash", "description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index 33cfb6084308..f0a981b350b3 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -28,16 +28,18 @@ function canUseIOU(betas) { } /** + * @param {Array} betas * @returns {Boolean} */ -function canUsePayWithExpensify() { +function canUsePayWithExpensify(betas) { return _.contains(betas, CONST.BETAS.PAY_WITH_EXPENSIFY) || canUseAllBetas(); } /** + * @param {Array} betas * @returns {Boolean} */ -function canUseFreePlan() { +function canUseFreePlan(betas) { return _.contains(betas, CONST.BETAS.FREE_PLAN) || canUseAllBetas(); } diff --git a/src/pages/iou/IOUDetailsModal.js b/src/pages/iou/IOUDetailsModal.js index 5b00f2aa5556..878220af9793 100644 --- a/src/pages/iou/IOUDetailsModal.js +++ b/src/pages/iou/IOUDetailsModal.js @@ -67,6 +67,9 @@ const propTypes = { email: PropTypes.string, }).isRequired, + /** Beta features list */ + betas: PropTypes.arrayOf(PropTypes.string).isRequired, + ...withLocalizePropTypes, }; @@ -181,7 +184,7 @@ class IOUDetailsModal extends Component { */ addExpensifyPaymentOptionIfAvailable() { if (lodashGet(this.props, 'iouReport.currency') !== CONST.CURRENCY.USD - || !Permissions.canUsePayWithExpensify()) { + || !Permissions.canUsePayWithExpensify(this.props.betas)) { return; } @@ -286,5 +289,8 @@ export default compose( session: { key: ONYXKEYS.SESSION, }, + betas: { + key: ONYXKEYS.BETAS, + }, }), )(IOUDetailsModal);