Skip to content

Commit

Permalink
Merge pull request #11296 from Expensify/update-staging-from-main
Browse files Browse the repository at this point in the history
Update version to 1.2.7-0 on staging
  • Loading branch information
OSBotify authored Sep 26, 2022
2 parents eca59dc + 38e4ca2 commit 45dbb91
Show file tree
Hide file tree
Showing 52 changed files with 976 additions and 681 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001020600
versionName "1.2.6-0"
versionCode 1001020700
versionName "1.2.7-0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down
1 change: 1 addition & 0 deletions docs/_sass/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ body {
height: 100%;
min-height: 100%;
background: $color-white;
overflow: auto;
}

hr {
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/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.2.6</string>
<string>1.2.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.2.6.0</string>
<string>1.2.7.0</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/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.2.6</string>
<string>1.2.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.6.0</string>
<string>1.2.7.0</string>
</dict>
</plist>
10 changes: 5 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ PODS:
- nanopb/encode (= 2.30908.0)
- nanopb/decode (2.30908.0)
- nanopb/encode (2.30908.0)
- Onfido (25.1.0)
- onfido-react-native-sdk (5.4.0):
- Onfido (= 25.1.0)
- Onfido (26.0.1)
- onfido-react-native-sdk (6.0.0):
- Onfido (= 26.0.1)
- React
- OpenSSL-Universal (1.1.1100)
- Permission-LocationAccuracy (3.6.1):
Expand Down Expand Up @@ -941,8 +941,8 @@ SPEC CHECKSUMS:
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
Onfido: a1645279c7b6ca8de5bb95d27af53c523ffd731c
onfido-react-native-sdk: cfdfd1d4acf53e469a82b9684f92982d39744bb8
Onfido: 91935f0dcee9a6647fdb386fa87cb4af9d9a3c70
onfido-react-native-sdk: bc72114ac430a2636cd2f02972ddf5b8b3b397c6
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
Permission-LocationAccuracy: 76df17de5c6b8bc2eee34e61ee92cdd7a864c73d
Permission-LocationAlways: 8d99b025c9f73c696e0cdb367e42525f2e9a26f2
Expand Down
11 changes: 11 additions & 0 deletions jest/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,14 @@ jest.mock('../src/components/Icon/Expensicons', () => {
return {...prev, [key]: fn};
}, {});
});

// Set up manual mocks for any Logging methods that are supposed hit the 'server',
// this is needed because before, the Logging queue would get flushed while tests were running,
// causing unexpected calls to HttpUtils.xhr() which would cause mock mismatches and flaky tests.
/* eslint-disable no-console */
jest.mock('../src/libs/Log', () => ({
info: message => console.log(`[info] ${message} (mocked)`),
alert: message => console.log(`[alert] ${message} (mocked)`),
warn: message => console.log(`[warn] ${message} (mocked)`),
hmmm: message => console.log(`[hmmm] ${message} (mocked)`),
}));
21 changes: 10 additions & 11 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.2.6-0",
"version": "1.2.7-0",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down Expand Up @@ -43,7 +43,7 @@
"@formatjs/intl-numberformat": "^6.2.5",
"@formatjs/intl-pluralrules": "^4.0.13",
"@oguzhnatly/react-native-image-manipulator": "github:Expensify/react-native-image-manipulator#c5f654fc9d0ad7cc5b89d50b34ecf8b0e3f4d050",
"@onfido/react-native-sdk": "github:Expensify/react-native-sdk#d70947f263b2e59899d82f8d1ef3841d053927ff",
"@onfido/react-native-sdk": "6.0.0",
"@pieter-pot/react-native-fast-image": "8.5.11",
"@react-native-async-storage/async-storage": "^1.17.10",
"@react-native-community/cameraroll": "git+https://github.com/react-native-cameraroll/react-native-cameraroll.git#3f0aed96db68e134f199171c7b06c1b4d6cb382b",
Expand Down
2 changes: 1 addition & 1 deletion src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ const CONST = {
FREQUENTLY_USED_EMOJIS: 'expensify_frequentlyUsedEmojis',
},
DEFAULT_TIME_ZONE: {automatic: true, selected: 'America/Los_Angeles'},
DEFAULT_ACCOUNT_DATA: {errors: null, success: '', loading: false},
DEFAULT_ACCOUNT_DATA: {errors: null, success: '', isLoading: false},
APP_STATE: {
ACTIVE: 'active',
BACKGROUND: 'background',
Expand Down
6 changes: 5 additions & 1 deletion src/components/AddPaymentMethodMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import CONST from '../CONST';
import withWindowDimensions from './withWindowDimensions';
import Permissions from '../libs/Permissions';
import PopoverMenu from './PopoverMenu';
import * as BankAccounts from '../libs/actions/BankAccounts';

const propTypes = {
isVisible: PropTypes.bool.isRequired,
Expand Down Expand Up @@ -47,7 +48,10 @@ const AddPaymentMethodMenu = props => (
{
text: props.translate('common.bankAccount'),
icon: Expensicons.Bank,
onSelected: () => props.onItemSelected(CONST.PAYMENT_METHODS.BANK_ACCOUNT),
onSelected: () => {
BankAccounts.clearPlaid();
props.onItemSelected(CONST.PAYMENT_METHODS.BANK_ACCOUNT);
},
},
...(Permissions.canUseWallet(props.betas) ? [{
text: props.translate('common.debitCard'),
Expand Down
43 changes: 18 additions & 25 deletions src/components/AddPlaidBankAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const defaultProps = {
bankName: '',
plaidAccessToken: '',
bankAccounts: [],
loading: false,
isLoading: false,
error: '',
},
plaidLinkToken: '',
Expand All @@ -77,21 +77,14 @@ class AddPlaidBankAccount extends React.Component {

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

this.state = {
selectedIndex: undefined,
institution: {},
};
}

componentDidMount() {
// If we're coming from Plaid OAuth flow then we need to reuse the existing plaidLinkToken
// Otherwise, clear the existing token and fetch a new one
if (this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken) {
if ((this.props.receivedRedirectURI && this.props.plaidLinkOAuthToken) || !_.isEmpty(this.props.plaidData)) {
return;
}

BankAccounts.clearPlaid();
BankAccounts.openPlaidBankLogin(this.props.allowDebit, this.props.bankAccountID);
}

Expand Down Expand Up @@ -119,30 +112,30 @@ class AddPlaidBankAccount extends React.Component {

/**
* Triggered when user selects a Plaid bank account.
* @param {String} index
* @param {String} plaidAccountID
*/
selectAccount(index) {
this.setState({selectedIndex: Number(index)}, () => {
const selectedPlaidBankAccount = this.getPlaidBankAccounts()[this.state.selectedIndex];
selectedPlaidBankAccount.bankName = this.props.plaidData.bankName;
selectedPlaidBankAccount.plaidAccessToken = this.props.plaidData.plaidAccessToken;
this.props.onSelect({selectedPlaidBankAccount});
});
selectAccount(plaidAccountID) {
const selectedPlaidBankAccount = _.findWhere(this.getPlaidBankAccounts(), {plaidAccountID});
selectedPlaidBankAccount.bankName = this.props.plaidData.bankName;
selectedPlaidBankAccount.plaidAccessToken = this.props.plaidData.plaidAccessToken;
this.props.onSelect({selectedPlaidBankAccount});
}

render() {
const plaidBankAccounts = this.getPlaidBankAccounts();
const token = this.getPlaidLinkToken();
const options = _.map(plaidBankAccounts, (account, index) => ({
value: index, label: `${account.addressName} ${account.mask}`,
const options = _.map(plaidBankAccounts, account => ({
value: account.plaidAccountID, label: `${account.addressName} ${account.mask}`,
}));
const {icon, iconSize} = getBankIcon(this.state.institution.name);
const institutionName = lodashGet(this.props, 'plaidData.institution.name', '');
const selectedPlaidBankAccount = lodashGet(this.props, 'plaidData.selectedPlaidBankAccount', {});
const {icon, iconSize} = getBankIcon();

// Plaid Link view
if (!plaidBankAccounts.length) {
return (
<FullPageOfflineBlockingView>
{(!token || this.props.plaidData.loading)
{(!token || this.props.plaidData.isLoading)
&& (
<View style={[styles.flex1, styles.alignItemsCenter, styles.justifyContentCenter]}>
<ActivityIndicator color={themeColors.spinner} size="large" />
Expand All @@ -159,7 +152,7 @@ class AddPlaidBankAccount extends React.Component {
onSuccess={({publicToken, metadata}) => {
Log.info('[PlaidLink] Success!');
BankAccounts.openPlaidBankAccountSelector(publicToken, metadata.institution.name, this.props.allowDebit);
this.setState({institution: metadata.institution});
BankAccounts.updatePlaidData({institution: metadata.institution});
}}
onError={(error) => {
Log.hmmm('[PlaidLink] Error: ', error.message);
Expand Down Expand Up @@ -187,18 +180,18 @@ class AddPlaidBankAccount extends React.Component {
height={iconSize}
width={iconSize}
/>
<Text style={[styles.ml3, styles.textStrong]}>{this.state.institution.name}</Text>
<Text style={[styles.ml3, styles.textStrong]}>{institutionName}</Text>
</View>
<View style={[styles.mb5]}>
<Picker
label={this.props.translate('addPersonalBankAccountPage.chooseAccountLabel')}
onInputChange={this.selectAccount}
items={options}
placeholder={_.isUndefined(this.state.selectedIndex) ? {
placeholder={_.isUndefined(this.props.plaidData.selectedPlaidBankAccount) ? {
value: '',
label: this.props.translate('bankAccount.chooseAnAccount'),
} : {}}
value={this.state.selectedIndex}
value={selectedPlaidBankAccount.plaidAccountID}
/>
</View>
</View>
Expand Down
17 changes: 7 additions & 10 deletions src/components/InvertedFlatList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,13 @@ class InvertedFlatList extends React.Component {
this.props.innerRef(this.list);
}

if (this.list) {
this.list
.getScrollableNode()
.addEventListener('wheel', this.invertedWheelEvent);

this.list.setNativeProps({
style: {
transform: 'translate3d(0,0,0) scaleY(-1)',
},
});
if (!this.list) {
return;
}

this.list
.getScrollableNode()
.addEventListener('wheel', this.invertedWheelEvent);
}

componentWillUnmount() {
Expand All @@ -67,6 +63,7 @@ class InvertedFlatList extends React.Component {
ref={el => this.list = el}
shouldMeasureItems
contentContainerStyle={StyleSheet.compose(this.props.contentContainerStyle, styles.justifyContentEnd)}
style={{transform: [{translateX: 0}, {translateY: 0}, {scaleY: -1}]}}
/>
);
}
Expand Down
10 changes: 10 additions & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,16 @@ export default {
addAttachment: 'Add attachment',
writeSomething: 'Write something...',
sayHello: 'Say hello!',
conciergePlaceholderOptions: [
'Ask for help!',
'Ask me anything!',
'Ask me to book travel!',
'Ask me what I can do!',
'Ask me how to pay people!',
'Ask me how to send an invoice!',
'Ask me how to scan a receipt!',
'Ask me how to get a free corporate card!',
],
blockedFromConcierge: 'Communication is barred',
fileUploadFailed: 'Upload failed. File is not supported.',
localTime: ({user, time}) => `It's ${time} for ${user}`,
Expand Down
10 changes: 10 additions & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,16 @@ export default {
addAttachment: 'Agregar archivo adjunto',
writeSomething: 'Escribe algo...',
sayHello: 'Di hola!',
conciergePlaceholderOptions: [
'¡Pide ayuda!',
'¡Pregúntame lo que sea!',
'¡Pídeme que te reserve un viaje!',
'¡Pregúntame qué puedo hacer!',
'¡Pregúntame cómo pagar a la gente!',
'¡Pregúntame cómo enviar una factura!',
'¡Pregúntame cómo escanear un recibo!',
'¡Pregúntame cómo obtener una tarjeta de crédito corporativa gratis!',
],
blockedFromConcierge: 'Comunicación no permitida',
fileUploadFailed: 'Subida fallida. El archivo no es compatible.',
localTime: ({user, time}) => `Son las ${time} para ${user}`,
Expand Down
Loading

0 comments on commit 45dbb91

Please sign in to comment.