diff --git a/android/app/build.gradle b/android/app/build.gradle
index 5acedbdd14f9..058b4b001e00 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 1001005206
- versionName "1.0.52-6"
+ versionCode 1001005300
+ versionName "1.0.53-0"
}
splits {
abi {
diff --git a/ios/ExpensifyCash/Info.plist b/ios/ExpensifyCash/Info.plist
index e97db688cd25..5e6884302fd0 100644
--- a/ios/ExpensifyCash/Info.plist
+++ b/ios/ExpensifyCash/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.0.52
+ 1.0.53
CFBundleSignature
????
CFBundleURLTypes
@@ -30,7 +30,7 @@
CFBundleVersion
- 1.0.52.6
+ 1.0.53.0
ITSAppUsesNonExemptEncryption
LSApplicationQueriesSchemes
diff --git a/ios/ExpensifyCashTests/Info.plist b/ios/ExpensifyCashTests/Info.plist
index ad7ce663d754..32492bb837f4 100644
--- a/ios/ExpensifyCashTests/Info.plist
+++ b/ios/ExpensifyCashTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.0.52
+ 1.0.53
CFBundleSignature
????
CFBundleVersion
- 1.0.52.6
+ 1.0.53.0
diff --git a/package-lock.json b/package-lock.json
index d7cab5e5ad52..39bacbbaa864 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
- "version": "1.0.52-6",
+ "version": "1.0.53-0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 3a79571ed930..fc98a221097c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
- "version": "1.0.52-6",
+ "version": "1.0.53-0",
"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/pages/iou/IOUDetailsModal.js b/src/pages/iou/IOUDetailsModal.js
index aa1ca35379cb..d847390cd6a8 100644
--- a/src/pages/iou/IOUDetailsModal.js
+++ b/src/pages/iou/IOUDetailsModal.js
@@ -14,7 +14,6 @@ import ScreenWrapper from '../../components/ScreenWrapper';
import {payIOUReport} from '../../libs/actions/IOU';
import {fetchIOUReportByID} from '../../libs/actions/Report';
import ReportActionItemIOUPreview from '../../components/ReportActionItemIOUPreview';
-import iouTransactionPropTypes from './iouTransactionPropTypes';
import IOUTransactions from './IOUTransactions';
import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize';
import compose from '../../libs/compose';
@@ -53,9 +52,6 @@ const propTypes = {
/** Owner is the person who is owed money */
ownerEmail: PropTypes.string,
- /** The IOU transactions */
- transactions: PropTypes.arrayOf(PropTypes.shape(iouTransactionPropTypes)),
-
/** Does the report have an outstanding IOU that needs to be paid? */
hasOutstandingIOU: PropTypes.bool,
}).isRequired,
@@ -116,7 +112,6 @@ class IOUDetailsModal extends Component {
diff --git a/src/pages/iou/IOUTransactions.js b/src/pages/iou/IOUTransactions.js
index b01323d87e6e..0a5e9347ba2e 100644
--- a/src/pages/iou/IOUTransactions.js
+++ b/src/pages/iou/IOUTransactions.js
@@ -1,4 +1,4 @@
-import React, {Component} from 'react';
+import React from 'react';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
@@ -6,7 +6,6 @@ import PropTypes from 'prop-types';
import styles from '../../styles/styles';
import ONYXKEYS from '../../ONYXKEYS';
import ReportActionPropTypes from '../home/report/ReportActionPropTypes';
-import iouTransactionPropTypes from './iouTransactionPropTypes';
import ReportTransaction from '../../components/ReportTransaction';
const propTypes = {
@@ -18,65 +17,33 @@ const propTypes = {
/** ReportID for the associated IOU report */
iouReportID: PropTypes.number.isRequired,
-
- /** Transactions for this IOU report */
- transactions: PropTypes.arrayOf(PropTypes.shape(iouTransactionPropTypes)),
};
const defaultProps = {
reportActions: {},
- transactions: [],
};
-class IOUTransactions extends Component {
- constructor(props) {
- super(props);
-
- this.getActionForTransaction = this.getActionForTransaction.bind(this);
- }
-
- /**
- * Given a transaction from an IOU Report, returns the chatReport action with a matching transactionID. Unless
- * something has gone wrong with our storing logic, there should always exist an action for each transaction.
- *
- * @param {Object} transaction
- * @returns {Object} action
- */
- getActionForTransaction(transaction) {
- const matchedAction = _.find(this.props.reportActions, (action) => {
- // iouReport.transaction.transactionID is returned as a String, but the originalMessage value is Number
- if (action && action.originalMessage && action.originalMessage.IOUTransactionID
- && action.originalMessage.IOUTransactionID.toString() === transaction.transactionID) {
- return action;
+const IOUTransactions = ({
+ reportActions,
+ chatReportID,
+ iouReportID,
+}) => (
+
+ {_.map(reportActions, (reportAction) => {
+ if (reportAction.actionName === 'IOU'
+ && reportAction.originalMessage.IOUReportID === iouReportID) {
+ return (
+
+ );
}
- return false;
- });
- if (!matchedAction) {
- throw new Error(`Unable to locate a matching report action for transaction ${transaction.transactionID}!`);
- }
-
- return matchedAction;
- }
-
- render() {
- return (
-
- {/* For each IOU transaction, get the matching report action */}
- {_.map(this.props.transactions, (transaction) => {
- const action = this.getActionForTransaction(transaction);
- return (
-
- );
- })}
-
- );
- }
-}
+ })}
+
+);
IOUTransactions.defaultProps = defaultProps;
IOUTransactions.propTypes = propTypes;
diff --git a/src/pages/iou/iouTransactionPropTypes.js b/src/pages/iou/iouTransactionPropTypes.js
deleted file mode 100644
index 51664bfd8559..000000000000
--- a/src/pages/iou/iouTransactionPropTypes.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import PropTypes from 'prop-types';
-
-export default {
- /** The transaction currency code */
- currency: PropTypes.string,
-
- /** The transaction amount */
- amount: PropTypes.number,
-
- /** The transaction comment */
- comment: PropTypes.string,
-
- /** Date that the transaction was created */
- created: PropTypes.string,
-
- /** The ID of this report transaction */
- transactionID: PropTypes.string,
-};