Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version to 1.0.68-0 on staging #3549

Merged
merged 52 commits into from
Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
ecb9990
add business bank account new page
marcaaron Jun 8, 2021
c128cfe
add create manual form
marcaaron Jun 8, 2021
5db6177
Move logic out of AddBankAccountPage into AddPlaidBankAccount
marcaaron Jun 8, 2021
176b380
refactor plaid link stuff
marcaaron Jun 8, 2021
225ef6f
fix conflicts
marcaaron Jun 9, 2021
35e91bf
fix style
marcaaron Jun 9, 2021
a84e2fd
Refactor Plaid module so it can be easily used in the the two flows
marcaaron Jun 9, 2021
78ebe95
fix conflicts
marcaaron Jun 9, 2021
8ae125e
update import and clear plaid token on init
marcaaron Jun 9, 2021
ff91605
clean up beta logic
marcaaron Jun 9, 2021
84cfe10
use CheckboxWithLabel
marcaaron Jun 9, 2021
d9ed59a
Fix up checkbox usages
marcaaron Jun 9, 2021
6fbbf5f
update spanish
marcaaron Jun 9, 2021
5cdaec2
fix style
marcaaron Jun 9, 2021
d5d1d99
add checks for number
marcaaron Jun 9, 2021
f985e1a
Use same validation that Web-Secure is using for now
marcaaron Jun 9, 2021
5cfa72d
remove null checks
marcaaron Jun 9, 2021
857ac9a
translate
marcaaron Jun 9, 2021
7d4a9c8
use func for propTypes
marcaaron Jun 9, 2021
a098b66
add assets
marcaaron Jun 9, 2021
7e96346
fix checkbox text flow on iOS
marcaaron Jun 9, 2021
ac39938
remove returnKeyType
marcaaron Jun 9, 2021
f49659a
Remove persistant location
AndrewGable Jun 9, 2021
45b86d0
fix up misaligned lock icon
marcaaron Jun 10, 2021
8a19a67
rename check image. fix up text link and consts
marcaaron Jun 10, 2021
d04ed46
do not pass array to TextLink
marcaaron Jun 10, 2021
df018cd
remove geolocation library
Julesssss Jun 10, 2021
47c3fd3
remove Geolocation usage
Julesssss Jun 10, 2021
ad763dd
remove Android Gelocation library changes
Julesssss Jun 10, 2021
8afe2f9
Merge branch 'main' into andrew-location
Julesssss Jun 10, 2021
b58e76c
remove geolocation library from iOS podfile
Julesssss Jun 10, 2021
e74a10c
remove a literally useless function
Julesssss Jun 10, 2021
ca9ee58
get current currency when opening IOU Modal
Julesssss Jun 10, 2021
d47763e
remove unnecessary preferred currency retrieval
Julesssss Jun 10, 2021
b413d2f
clean up a few comments left on contributor PR
Julesssss Jun 10, 2021
eb73dc9
Merge branch 'main' into andrew-location
Julesssss Jun 10, 2021
108674f
use higher quality image
marcaaron Jun 10, 2021
e99e950
#3102 add es translation for close
dklymenk Jun 10, 2021
6b3d5f5
make requested changes
marcaaron Jun 10, 2021
157db96
Merge pull request #3459 from Expensify/marcaaron-addBusinessBankAcco…
marcaaron Jun 11, 2021
8f08862
Make tapping the entire IOU preview component open the IOU Details modal
jasperhuangg Jun 11, 2021
a5801aa
Fix import
jasperhuangg Jun 11, 2021
cc80698
revert changes accidentally added in
jasperhuangg Jun 11, 2021
709747e
revert changes accidentally added in
jasperhuangg Jun 11, 2021
a37e51c
remove whitespace
jasperhuangg Jun 11, 2021
58e1584
Merge pull request #3514 from Expensify/andrew-location
MonilBhavsar Jun 11, 2021
3284a15
Merge pull request #3541 from Expensify/jasper-tappableIouDetailsPreview
mountiny Jun 11, 2021
0984c69
Merge branch 'main' into 3102-add-es-translation-for-close-message
dklymenk Jun 11, 2021
bcd533b
Merge pull request #3525 from dklymenk/3102-add-es-translation-for-cl…
Luke9389 Jun 11, 2021
a026252
Update version to 1.0.68-0
Jun 11, 2021
ce63459
Merge pull request #3548 from Expensify/version-PATCH-bcd533bcecba1f1…
OSBotify Jun 11, 2021
d20f589
Merge branch 'main' into update-staging-from-main
Jun 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 1001006700
versionName "1.0.67-0"
versionCode 1001006800
versionName "1.0.68-0"
}
splits {
abi {
Expand Down
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
android:name=".MainApplication"
Expand Down
2 changes: 0 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
rootProject.name = 'ExpensifyCash'
include ':@react-native-community_geolocation'
project(':@react-native-community_geolocation').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/geolocation/android')
include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
include ':@react-native-community_async-storage'
Expand Down
3 changes: 3 additions & 0 deletions assets/images/bank.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/example-check-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/images/paycheck.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 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.67</string>
<string>1.0.68</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.67.0</string>
<string>1.0.68.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down Expand Up @@ -90,7 +90,6 @@
</array>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
<string>remote-notification</string>
</array>
<key>UIFileSharingEnabled</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.67</string>
<string>1.0.68</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.67.0</string>
<string>1.0.68.0</string>
</dict>
</plist>
8 changes: 1 addition & 7 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,6 @@ PODS:
- React-Core
- react-native-document-picker (4.0.0):
- React-Core
- react-native-geolocation-service (5.2.0):
- React
- react-native-image-picker (2.3.4):
- React-Core
- react-native-netinfo (5.9.10):
Expand Down Expand Up @@ -545,7 +543,6 @@ DEPENDENCIES:
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- react-native-config (from `../node_modules/react-native-config`)
- react-native-document-picker (from `../node_modules/react-native-document-picker`)
- react-native-geolocation-service (from `../node_modules/react-native-geolocation-service`)
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-pdf (from `../node_modules/react-native-pdf`)
Expand Down Expand Up @@ -654,8 +651,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-config"
react-native-document-picker:
:path: "../node_modules/react-native-document-picker"
react-native-geolocation-service:
:path: "../node_modules/react-native-geolocation-service"
react-native-image-picker:
:path: "../node_modules/react-native-image-picker"
react-native-netinfo:
Expand Down Expand Up @@ -733,7 +728,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: 7b423f9e248eae65987838148c36eec1dbfe0b53
FBReactNativeSpec: 825b0f0851f5cc5c6268a920286281f62fc96c37
FBReactNativeSpec: fc439e6acc4ae4bb40105318e8ee1d099f4932d2
Firebase: c23a36d9e4cdf7877dfcba8dd0c58add66358999
FirebaseAnalytics: 3bb096873ee0d7fa4b6c70f5e9166b6da413cc7f
FirebaseCore: d3a978a3cfa3240bf7e4ba7d137fdf5b22b628ec
Expand Down Expand Up @@ -774,7 +769,6 @@ SPEC CHECKSUMS:
React-jsinspector: 500a59626037be5b3b3d89c5151bc3baa9abf1a9
react-native-config: d8b45133fd13d4f23bd2064b72f6e2c08b2763ed
react-native-document-picker: b3e78a8f7fef98b5cb069f20fc35797d55e68e28
react-native-geolocation-service: 7c9436da6dfdecd9526c62eac62ea2bc3f0cc8ea
react-native-image-picker: 32d1ad2c0024ca36161ae0d5c2117e2d6c441f11
react-native-netinfo: 52cf0ee8342548a485e28f4b09e56b477567244d
react-native-pdf: 4b5a9e4465a6a3b399e91dc4838eb44ddf716d1f
Expand Down
7 changes: 1 addition & 6 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expensify.cash",
"version": "1.0.67-0",
"version": "1.0.68-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 Expand Up @@ -74,7 +74,6 @@
"react-native-bootsplash": "^3.2.0",
"react-native-config": "^1.4.0",
"react-native-document-picker": "^4.0.0",
"react-native-geolocation-service": "^5.2.0",
"react-native-gesture-handler": "1.9.0",
"react-native-image-pan-zoom": "^2.1.12",
"react-native-image-picker": "^2.3.3",
Expand Down
10 changes: 10 additions & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ const CONST = {
IOS: 'https://apps.apple.com/us/app/expensify-cash/id1530278510',
DESKTOP: 'https://expensify.cash/Expensify.cash.dmg',
},
BANK_ACCOUNT: {
ADD_METHOD: {
MANUAL: 'manual',
PLAID: 'plaid',
},
REGEX: {
IBAN: /^[A-Za-z0-9]{2,30}$/,
SWIFT_BIC: /^[A-Za-z0-9]{8,11}$/,
},
},
BETAS: {
ALL: 'all',
CHRONOS_IN_CASH: 'chronosInCash',
Expand Down
1 change: 1 addition & 0 deletions src/ROUTES.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const REPORT = 'r';

export default {
ADD_PERSONAL_BANK_ACCOUNT: 'add-personal-bank-account',
BANK_ACCOUNT_NEW: 'bank-account/new',
HOME: '',
SETTINGS: 'settings',
SETTINGS_PROFILE: 'settings/profile',
Expand Down
202 changes: 202 additions & 0 deletions src/components/AddPlaidBankAccount.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
import _ from 'underscore';
import React from 'react';
import {
ActivityIndicator,
View,
TextInput,
} from 'react-native';
import PropTypes from 'prop-types';
import lodashGet from 'lodash/get';
import {withOnyx} from 'react-native-onyx';
import PlaidLink from './PlaidLink';
import {
clearPlaidBankAccountsAndToken,
fetchPlaidLinkToken,
getPlaidBankAccounts,
} from '../libs/actions/BankAccounts';
import ONYXKEYS from '../ONYXKEYS';
import styles from '../styles/styles';
import canFocusInputOnScreenFocus from '../libs/canFocusInputOnScreenFocus';
import compose from '../libs/compose';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import Button from './Button';
import Picker from './Picker';
import Icon from './Icon';
import {DownArrow} from './Icon/Expensicons';
import Text from './Text';

const propTypes = {
...withLocalizePropTypes,

/** Plaid SDK token to use to initialize the widget */
plaidLinkToken: PropTypes.string,

/** Contains list of accounts and loading state while fetching them */
plaidBankAccounts: PropTypes.shape({
/** Whether we are fetching the bank accounts from the API */
loading: PropTypes.bool,

/** List of accounts */
accounts: PropTypes.arrayOf(PropTypes.object),
}),

/** Fired when the user exits the Plaid flow */
onExitPlaid: PropTypes.func,

/** Fired when the user selects an account and submits the form */
onSubmit: PropTypes.func,

/** Additional text to display */
text: PropTypes.string,
};

const defaultProps = {
plaidLinkToken: '',
plaidBankAccounts: {
loading: false,
},
onExitPlaid: () => {},
onSubmit: () => {},
text: '',
};

class AddPlaidBankAccount extends React.Component {
constructor(props) {
super(props);

this.selectAccount = this.selectAccount.bind(this);

this.state = {
selectedIndex: undefined,
password: '',
isCreatingAccount: false,
institution: {},
};
}

componentDidMount() {
clearPlaidBankAccountsAndToken();
fetchPlaidLinkToken();
}

/**
* Get list of bank accounts
*
* @returns {Object[]}
*/
getAccounts() {
return lodashGet(this.props.plaidBankAccounts, 'accounts', []);
}

selectAccount() {
const account = this.getAccounts()[this.state.selectedIndex];
this.props.onSubmit({
account, password: this.state.password, plaidLinkToken: this.props.plaidLinkToken,
});
this.setState({isCreatingAccount: true});
}

render() {
const accounts = this.getAccounts();
const options = _.chain(accounts)
.filter(account => !account.alreadyExists)
.map((account, index) => ({
value: index, label: `${account.addressName} ${account.accountNumber}`,
}))
.value();

return (
<>
{(!this.props.plaidLinkToken || this.props.plaidBankAccounts.loading)
&& (
<View style={[styles.flex1, styles.alignItemsCenter, styles.justifyContentCenter]}>
<ActivityIndicator size="large" />
</View>
)}
{!_.isEmpty(this.props.plaidLinkToken) && (
<PlaidLink
token={this.props.plaidLinkToken}
onSuccess={({publicToken, metadata}) => {
getPlaidBankAccounts(publicToken, metadata.institution.name);
this.setState({institution: metadata.institution});
}}
onError={(error) => {
console.debug(`Plaid Error: ${error.message}`);
}}

// User prematurely exited the Plaid flow
// eslint-disable-next-line react/jsx-props-no-multi-spaces
onExit={this.props.onExitPlaid}
/>
)}
{accounts.length > 0 && (
<>
<View style={[styles.m5, styles.flex1]}>
{!_.isEmpty(this.props.text) && (
<Text style={[styles.mb5]}>{this.props.text}</Text>
)}
{/* @TODO there are a bunch of logos to incorporate here to replace this name
https://d2k5nsl2zxldvw.cloudfront.net/images/plaid/[email protected] */}
<Text style={[styles.mb5, styles.h1]}>{this.state.institution.name}</Text>
<View style={[styles.mb5]}>
<Picker
onChange={(index) => {
this.setState({selectedIndex: Number(index)});
}}
items={options}
placeholder={_.isUndefined(this.state.selectedIndex) ? {
value: '',
label: this.props.translate('bankAccount.chooseAnAccount'),
} : {}}
value={this.state.selectedIndex}
icon={() => <Icon src={DownArrow} />}
/>
</View>
{!_.isUndefined(this.state.selectedIndex) && (
<View style={[styles.mb5]}>
<Text style={[styles.formLabel]}>
{this.props.translate('addPersonalBankAccountPage.enterPassword')}
</Text>
<TextInput
secureTextEntry
style={[styles.textInput, styles.mb2]}
value={this.state.password}
autoCompleteType="password"
textContentType="password"
autoCapitalize="none"
autoFocus={canFocusInputOnScreenFocus()}
onChangeText={text => this.setState({password: text})}
/>
</View>
)}
</View>
<View style={[styles.m5]}>
<Button
success
text={this.props.translate('common.saveAndContinue')}
isLoading={this.state.isCreatingAccount}
onPress={this.selectAccount}
isDisabled={_.isUndefined(this.state.selectedIndex) || !this.state.password}
/>
</View>
</>
)}
</>
);
}
}

AddPlaidBankAccount.propTypes = propTypes;
AddPlaidBankAccount.defaultProps = defaultProps;

export default compose(
withLocalize,
withOnyx({
plaidLinkToken: {
key: ONYXKEYS.PLAID_LINK_TOKEN,
},
plaidBankAccounts: {
key: ONYXKEYS.PLAID_BANK_ACCOUNTS,
},
}),
)(AddPlaidBankAccount);
Loading