From dd48c8c4b05dd25405976df376d088d1c07c2398 Mon Sep 17 00:00:00 2001 From: OSBotify <76178356+OSBotify@users.noreply.github.com> Date: Wed, 9 Jun 2021 15:58:49 -0700 Subject: [PATCH 1/2] Merge pull request #3500 from Expensify/version-BUILD-c1858001ab8b80e7d925984ac9c48499b1de1f44 (cherry picked from commit 0a90b0f716114838f1e37f6c636e4da004c1052d) --- android/app/build.gradle | 4 ++-- ios/ExpensifyCash/Info.plist | 2 +- ios/ExpensifyCashTests/Info.plist | 2 +- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) 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.", From 9b26ab0573bb4c44c59c69055956eb0e36fecf95 Mon Sep 17 00:00:00 2001 From: Rory Abraham <47436092+roryabraham@users.noreply.github.com> Date: Wed, 9 Jun 2021 10:30:12 -0700 Subject: [PATCH 2/2] Merge pull request #3481 from Expensify/jules-iouFixPermissionsRegression Update Permissions logic to fix IOU regression (cherry picked from commit 64f1307f230dada6e79c80452683e4018f626bcc) --- src/libs/Permissions.js | 6 ++++-- src/pages/iou/IOUDetailsModal.js | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) 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);