Skip to content

Commit

Permalink
Merge pull request #3345 from Expensify/main
Browse files Browse the repository at this point in the history
  • Loading branch information
OSBotify authored Jun 3, 2021
2 parents a9f1bf8 + 9b5a1bb commit 3ed10e1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001006109
versionName "1.0.61-9"
versionCode 1001006200
versionName "1.0.62-0"
}
splits {
abi {
Expand Down
4 changes: 2 additions & 2 deletions ios/ExpensifyCash/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.61</string>
<string>1.0.62</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.61.9</string>
<string>1.0.62.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/ExpensifyCashTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.61</string>
<string>1.0.62</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.61.9</string>
<string>1.0.62.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
"version": "1.0.61-9",
"version": "1.0.62-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.",
Expand Down
22 changes: 16 additions & 6 deletions src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import Onyx from 'react-native-onyx';
import _ from 'underscore';
import CONST from '../../CONST';
import ONYXKEYS from '../../ONYXKEYS';
import ROUTES from '../../ROUTES';
import * as API from '../API';
import {getSimplifiedIOUReport, fetchChatReportsByIDs, fetchIOUReportByIDAndUpdateChatReport} from './Report';
import openURLInNewTab from '../openURLInNewTab';
import Navigation from '../Navigation/Navigation';

/**
* Retrieve the users preferred currency
Expand Down Expand Up @@ -73,7 +75,10 @@ function getIOUReportsForNewTransaction(requestParams) {
function createIOUTransaction(params) {
Onyx.merge(ONYXKEYS.IOU, {loading: true, creatingIOUTransaction: true, error: false});
API.CreateIOUTransaction(params)
.then(data => getIOUReportsForNewTransaction([data]));
.then((data) => {
getIOUReportsForNewTransaction([data]);
Navigation.navigate(ROUTES.getReportRoute(data.chatReportID));
});
}

/**
Expand All @@ -87,14 +92,18 @@ function createIOUTransaction(params) {
function createIOUSplit(params) {
Onyx.merge(ONYXKEYS.IOU, {loading: true, creatingIOUTransaction: true, error: false});

let chatReportID;
API.CreateChatReport({
emailList: params.splits.map(participant => participant.email).join(','),
})
.then(data => API.CreateIOUSplit({
...params,
splits: JSON.stringify(params.splits),
reportID: data.reportID,
}))
.then((data) => {
chatReportID = data.reportID;
return API.CreateIOUSplit({
...params,
splits: JSON.stringify(params.splits),
reportID: data.reportID,
});
})
.then((data) => {
// This data needs to go from this:
// {reportIDList: [1, 2], chatReportIDList: [3, 4]}
Expand All @@ -110,6 +119,7 @@ function createIOUSplit(params) {
});
}
getIOUReportsForNewTransaction(reportParams);
Navigation.navigate(ROUTES.getReportRoute(chatReportID));
});
}

Expand Down

0 comments on commit 3ed10e1

Please sign in to comment.