diff --git a/src/pages/ReimbursementAccount/BankAccountStep.js b/src/pages/ReimbursementAccount/BankAccountStep.js index 5f4ac31f65d4..711dfeaadada 100644 --- a/src/pages/ReimbursementAccount/BankAccountStep.js +++ b/src/pages/ReimbursementAccount/BankAccountStep.js @@ -46,12 +46,19 @@ const propTypes = { /** During the OAuth flow we need to use the plaidLink token that we initially connected with */ plaidLinkOAuthToken: PropTypes.string, + /** Object with various information about the user */ + user: PropTypes.shape({ + /** Is the user account validated? */ + validated: PropTypes.bool, + }), + ...withLocalizePropTypes, }; const defaultProps = { receivedRedirectURI: null, plaidLinkOAuthToken: '', + user: {}, }; class BankAccountStep extends React.Component { @@ -180,7 +187,7 @@ class BankAccountStep extends React.Component { const bankAccountRoute = `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}${ROUTES.BANK_ACCOUNT}`; const error = lodashGet(this.props, 'reimbursementAccount.error', ''); const loading = lodashGet(this.props, 'reimbursementAccount.loading', false); - + const validated = lodashGet(this.props, 'user.validated', false); return ( BankAccounts.setBankAccountSubStep(CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID)} - disabled={this.props.isPlaidDisabled || !this.props.user.validated} + disabled={this.props.isPlaidDisabled || !validated} style={[styles.mt5, styles.mh3]} iconStyles={[styles.mr5]} shouldShowRightIcon @@ -234,11 +241,11 @@ class BankAccountStep extends React.Component { BankAccounts.setBankAccountSubStep(CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL)} shouldShowRightIcon /> - {!this.props.user.validated && ( + {!validated && (