Skip to content

Commit

Permalink
Merge pull request #10957 from Expensify/update-staging-from-main
Browse files Browse the repository at this point in the history
Update version to 1.2.0-0 on staging
  • Loading branch information
OSBotify authored Sep 13, 2022
2 parents 5178d6f + 24fed83 commit 9fba5b3
Show file tree
Hide file tree
Showing 37 changed files with 376 additions and 278 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001019904
versionName "1.1.99-4"
versionCode 1001020000
versionName "1.2.0-0"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
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.1.99</string>
<string>1.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.99.4</string>
<string>1.2.0.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.1.99</string>
<string>1.2.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.99.4</string>
<string>1.2.0.0</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions 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": "new.expensify",
"version": "1.1.99-4",
"version": "1.2.0-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
15 changes: 13 additions & 2 deletions src/components/AvatarWithIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import policyMemberPropType from '../pages/policyMemberPropType';
import bankAccountPropTypes from './bankAccountPropTypes';
import cardPropTypes from './cardPropTypes';
import userWalletPropTypes from '../pages/EnablePayments/userWalletPropTypes';
import {fullPolicyPropTypes} from '../pages/workspace/withFullPolicy';
import {policyPropTypes} from '../pages/workspace/withPolicy';
import walletTermsPropTypes from '../pages/EnablePayments/walletTermsPropTypes';
import * as PolicyUtils from '../libs/PolicyUtils';
import * as PaymentMethods from '../libs/actions/PaymentMethods';

Expand All @@ -29,7 +30,7 @@ const propTypes = {
policiesMemberList: PropTypes.objectOf(policyMemberPropType),

/** All the user's policies (from Onyx via withFullPolicy) */
policies: PropTypes.objectOf(fullPolicyPropTypes.policy),
policies: PropTypes.objectOf(policyPropTypes.policy),

/** List of bank accounts */
bankAccountList: PropTypes.objectOf(bankAccountPropTypes),
Expand All @@ -39,6 +40,9 @@ const propTypes = {

/** The user's wallet (coming from Onyx) */
userWallet: userWalletPropTypes,

/** Information about the user accepting the terms for payments */
walletTerms: walletTermsPropTypes,
};

const defaultProps = {
Expand All @@ -49,6 +53,7 @@ const defaultProps = {
bankAccountList: {},
cardList: {},
userWallet: {},
walletTerms: {},
};

const AvatarWithIndicator = (props) => {
Expand All @@ -73,6 +78,9 @@ const AvatarWithIndicator = (props) => {
() => _.some(cleanPolicies, PolicyUtils.hasPolicyError),
() => _.some(cleanPolicies, PolicyUtils.hasCustomUnitsError),
() => _.some(cleanPolicyMembers, PolicyUtils.hasPolicyMemberError),

// Wallet term errors that are not caused by an IOU (we show the red brick indicator for those in the LHN instead)
() => !_.isEmpty(props.walletTerms.errors) && !props.walletTerms.chatReportID,
];
const shouldShowIndicator = _.some(errorCheckingMethods, errorCheckingMethod => errorCheckingMethod());

Expand Down Expand Up @@ -112,4 +120,7 @@ export default withOnyx({
userWallet: {
key: ONYXKEYS.USER_WALLET,
},
walletTerms: {
key: ONYXKEYS.WALLET_TERMS,
},
})(AvatarWithIndicator);
2 changes: 2 additions & 0 deletions src/components/KYCWall/BaseKYCWall.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as PaymentMethods from '../../libs/actions/PaymentMethods';
import ONYXKEYS from '../../ONYXKEYS';
import Log from '../../libs/Log';
import {propTypes, defaultProps} from './kycWallPropTypes';
import * as Wallet from '../../libs/actions/Wallet';

// This component allows us to block various actions by forcing the user to first add a default payment method and successfully make it through our Know Your Customer flow
// before continuing to take whatever action they originally intended to take. It requires a button as a child and a native event so we can get the coordinates and use it
Expand All @@ -35,6 +36,7 @@ class KYCWall extends React.Component {
if (this.props.shouldListenForResize) {
this.dimensionsSubscription = Dimensions.addEventListener('change', this.setMenuPosition);
}
Wallet.setKYCWallSourceChatReportID(this.props.chatReportID);
}

componentWillUnmount() {
Expand Down
6 changes: 5 additions & 1 deletion src/components/KYCWall/kycWallPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ const propTypes = {
isDisabled: PropTypes.bool,

/** The user's wallet */
userWallet: PropTypes.objectOf(userWalletPropTypes),
userWallet: userWalletPropTypes,

/** When the button is opened via an IOU, ID for the chatReport that the IOU is linked to */
chatReportID: PropTypes.number,
};

const defaultProps = {
userWallet: {},
popoverPlacement: 'top',
shouldListenForResize: false,
isDisabled: false,
chatReportID: 0,
};

export {propTypes, defaultProps};
106 changes: 62 additions & 44 deletions src/components/ReportActionItem/IOUPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import Icon from '../Icon';
import CONST from '../../CONST';
import * as Expensicons from '../Icon/Expensicons';
import Text from '../Text';
import * as PaymentMethods from '../../libs/actions/PaymentMethods';
import OfflineWithFeedback from '../OfflineWithFeedback';
import walletTermsPropTypes from '../../pages/EnablePayments/walletTermsPropTypes';

const propTypes = {
/** Additional logic for displaying the pay button */
Expand Down Expand Up @@ -75,6 +78,9 @@ const propTypes = {
email: PropTypes.string,
}).isRequired,

/** Information about the user accepting the terms for payments */
walletTerms: walletTermsPropTypes,

...withLocalizePropTypes,
};

Expand All @@ -84,6 +90,7 @@ const defaultProps = {
onPayButtonPressed: null,
onPreviewPressed: () => {},
containerStyles: [],
walletTerms: {},
};

const IOUPreview = (props) => {
Expand Down Expand Up @@ -124,10 +131,18 @@ const IOUPreview = (props) => {
{reportIsLoading
? <ActivityIndicator style={styles.iouPreviewBoxLoading} color={themeColors.text} />
: (
<View>
<View style={styles.flexRow}>
<View style={styles.flex1}>
<View style={styles.flexRow}>
<OfflineWithFeedback
pendingAction={CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD}
errors={props.walletTerms.errors}
onClose={() => {
PaymentMethods.clearWalletTermsError();
Report.clearIOUError(props.chatReportID);
}}
errorRowStyles={[styles.mbn1]}
>
<View>
<View style={styles.flexRow}>
<View style={[styles.flex1, styles.flexRow]}>
<Text style={styles.h1}>
{cachedTotal}
</Text>
Expand All @@ -137,48 +152,48 @@ const IOUPreview = (props) => {
</View>
)}
</View>
<View style={styles.iouPreviewBoxAvatar}>
<MultipleAvatars
icons={[managerAvatar, ownerAvatar]}
secondAvatarStyle={[styles.secondAvatarInline]}
avatarTooltips={avatarTooltip}
/>
</View>
</View>
<View style={styles.iouPreviewBoxAvatar}>
<MultipleAvatars
icons={[managerAvatar, ownerAvatar]}
secondAvatarStyle={[styles.secondAvatarInline]}
avatarTooltips={avatarTooltip}
/>
</View>
</View>
{isCurrentUserManager
? (
<Text>
{props.iouReport.hasOutstandingIOU
? props.translate('iou.youowe', {owner: ownerName})
: props.translate('iou.youpaid', {owner: ownerName})}
</Text>
)
: (
<Text>
{props.iouReport.hasOutstandingIOU
? props.translate('iou.owesyou', {manager: managerName})
: props.translate('iou.paidyou', {manager: managerName})}
</Text>
)}
{(isCurrentUserManager
&& !props.shouldHidePayButton
&& props.iouReport.stateNum === CONST.REPORT.STATE_NUM.PROCESSING && (
<TouchableOpacity
style={[styles.buttonSmall, styles.buttonSuccess, styles.mt4]}
onPress={props.onPayButtonPressed}
>
<Text
style={[
styles.buttonSmallText,
styles.buttonSuccessText,
]}
{isCurrentUserManager
? (
<Text>
{props.iouReport.hasOutstandingIOU
? props.translate('iou.youowe', {owner: ownerName})
: props.translate('iou.youpaid', {owner: ownerName})}
</Text>
)
: (
<Text>
{props.iouReport.hasOutstandingIOU
? props.translate('iou.owesyou', {manager: managerName})
: props.translate('iou.paidyou', {manager: managerName})}
</Text>
)}
{(isCurrentUserManager
&& !props.shouldHidePayButton
&& props.iouReport.stateNum === CONST.REPORT.STATE_NUM.PROCESSING && (
<TouchableOpacity
style={[styles.buttonSmall, styles.buttonSuccess, styles.mt4]}
onPress={props.onPayButtonPressed}
>
{props.translate('iou.pay')}
</Text>
</TouchableOpacity>
))}
</View>
<Text
style={[
styles.buttonSmallText,
styles.buttonSuccessText,
]}
>
{props.translate('iou.pay')}
</Text>
</TouchableOpacity>
))}
</View>
</OfflineWithFeedback>
)}
</View>
</TouchableWithoutFeedback>
Expand All @@ -201,5 +216,8 @@ export default compose(
session: {
key: ONYXKEYS.SESSION,
},
walletTerms: {
key: ONYXKEYS.WALLET_TERMS,
},
}),
)(IOUPreview);
4 changes: 0 additions & 4 deletions src/components/RoomNameInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import CONST from '../CONST';
import ONYXKEYS from '../ONYXKEYS';
import compose from '../libs/compose';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import withFullPolicy, {fullPolicyDefaultProps, fullPolicyPropTypes} from '../pages/workspace/withFullPolicy';
import TextInput from './TextInput';

const propTypes = {
Expand All @@ -22,7 +21,6 @@ const propTypes = {
errorText: PropTypes.string,

...withLocalizePropTypes,
...fullPolicyPropTypes,

/* Onyx Props */

Expand Down Expand Up @@ -53,7 +51,6 @@ const defaultProps = {
initialValue: '',
disabled: false,
errorText: '',
...fullPolicyDefaultProps,
forwardedRef: () => {},
};

Expand Down Expand Up @@ -114,7 +111,6 @@ RoomNameInput.defaultProps = defaultProps;

export default compose(
withLocalize,
withFullPolicy,
withOnyx({
reports: {
key: ONYXKEYS.COLLECTION.REPORT,
Expand Down
5 changes: 5 additions & 0 deletions src/components/SettlementButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ const propTypes = {
/** Information about the network */
network: networkPropTypes.isRequired,

/** When the button is opened via an IOU, ID for the chatReport that the IOU is linked to */
chatReportID: PropTypes.number,

...withLocalizePropTypes,
};

const defaultProps = {
currency: CONST.CURRENCY.USD,
shouldShowPaypal: false,
chatReportID: 0,
};

class SettlementButton extends React.Component {
Expand Down Expand Up @@ -80,6 +84,7 @@ class SettlementButton extends React.Component {
addBankAccountRoute={this.props.addBankAccountRoute}
addDebitCardRoute={this.props.addDebitCardRoute}
isDisabled={this.props.network.isOffline}
chatReportID={this.props.chatReportID}
>
{triggerKYCFlow => (
<ButtonWithMenu
Expand Down
2 changes: 2 additions & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,8 @@ export default {
activatedTitle: 'Wallet activated!',
activatedMessage: 'Congrats, your wallet is set up and ready to make payments.',
checkBackLater: 'We\'re still reviewing your information. Please check back later.',
continueToPayment: 'Continue to payment',
continueToTransfer: 'Continue to transfer',
},
companyStep: {
headerTitle: 'Company information',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,8 @@ export default {
activatedTitle: '¡Billetera activada!',
activatedMessage: 'Felicidades, tu Billetera está configurada y lista para hacer pagos.',
checkBackLater: 'Todavía estamos revisando tu información. Por favor, vuelva más tarde.',
continueToPayment: 'Continuar al pago',
continueToTransfer: 'Continuar a la transferencia',
},
companyStep: {
headerTitle: 'Información de la empresa',
Expand Down
8 changes: 8 additions & 0 deletions src/libs/actions/PaymentMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ function clearWalletError() {
Onyx.merge(ONYXKEYS.USER_WALLET, {errors: null});
}

/**
* Clear any error(s) related to the user's wallet terms
*/
function clearWalletTermsError() {
Onyx.merge(ONYXKEYS.WALLET_TERMS, {errors: null});
}

function deletePaymentCard(fundID) {
API.write('DeletePaymentCard', {
fundID,
Expand Down Expand Up @@ -355,4 +362,5 @@ export {
clearDeletePaymentMethodError,
clearAddPaymentMethodError,
clearWalletError,
clearWalletTermsError,
};
Loading

0 comments on commit 9fba5b3

Please sign in to comment.