Skip to content

Commit

Permalink
Merge branch 'neil-transition-flows' into neil-wait-for-onyx
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-marcellini committed Apr 28, 2022
2 parents 261dbb5 + 76035f9 commit 4eadfbb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
12 changes: 0 additions & 12 deletions src/pages/LogInWithShortLivedTokenPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import Navigation from '../libs/Navigation/Navigation';
import Log from '../libs/Log';

const propTypes = {
/** List of betas available to current user */
betas: PropTypes.arrayOf(PropTypes.string),

/** Boolean flag set when Onyx finishes clearing */
isOnyxDoneClearing: PropTypes.bool,

Expand Down Expand Up @@ -48,7 +45,6 @@ const propTypes = {
};

const defaultProps = {
betas: null,
isOnyxDoneClearing: false,
route: {
params: {},
Expand Down Expand Up @@ -97,11 +93,6 @@ class LogInWithShortLivedTokenPage extends Component {
}

navigateToExitRoute() {
if (!this.props.betas) {
// Wait to navigate until the betas are loaded. Some pages like ReimbursementAccountPage require betas, so keep loading until they are available.
return;
}

// exitTo is URI encoded because it could contain a variable number of slashes (i.e. "workspace/new" vs "workspace/<ID>/card")
const exitTo = decodeURIComponent(lodashGet(this.props.route.params, 'exitTo', ''));
if (exitTo === ROUTES.WORKSPACE_NEW) {
Expand Down Expand Up @@ -163,9 +154,6 @@ LogInWithShortLivedTokenPage.propTypes = propTypes;
LogInWithShortLivedTokenPage.defaultProps = defaultProps;

export default withOnyx({
betas: {
key: ONYXKEYS.BETAS,
},
isOnyxDoneClearing: {
key: ONYXKEYS.IS_ONYX_DONE_CLEARING,
},
Expand Down
14 changes: 0 additions & 14 deletions src/pages/ReimbursementAccount/ReimbursementAccountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ import {withOnyx} from 'react-native-onyx';
import Str from 'expensify-common/lib/str';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import Log from '../../libs/Log';
import ScreenWrapper from '../../components/ScreenWrapper';
import * as BankAccounts from '../../libs/actions/BankAccounts';
import ONYXKEYS from '../../ONYXKEYS';
import ReimbursementAccountLoadingIndicator from '../../components/ReimbursementAccountLoadingIndicator';
import Permissions from '../../libs/Permissions';
import Navigation from '../../libs/Navigation/Navigation';
import CONST from '../../CONST';
import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize';
Expand All @@ -33,9 +31,6 @@ import reimbursementAccountPropTypes from './reimbursementAccountPropTypes';
import WorkspaceResetBankAccountModal from '../workspace/WorkspaceResetBankAccountModal';

const propTypes = {
/** List of betas */
betas: PropTypes.arrayOf(PropTypes.string).isRequired,

/** ACH data for the withdrawal account actively being set up */
reimbursementAccount: reimbursementAccountPropTypes,

Expand Down Expand Up @@ -145,12 +140,6 @@ class ReimbursementAccountPage extends React.Component {
}

render() {
if (!Permissions.canUseFreePlan(this.props.betas)) {
Log.info('Not showing new bank account page because user is not on free plan beta');
Navigation.dismissModal();
return null;
}

// The SetupWithdrawalAccount flow allows us to continue the flow from various points depending on where the
// user left off. This view will refer to the achData as the single source of truth to determine which route to
// display. We can also specify a specific route to navigate to via route params when the component first
Expand Down Expand Up @@ -250,9 +239,6 @@ export default compose(
session: {
key: ONYXKEYS.SESSION,
},
betas: {
key: ONYXKEYS.BETAS,
},
plaidLinkToken: {
key: ONYXKEYS.PLAID_LINK_TOKEN,
},
Expand Down

0 comments on commit 4eadfbb

Please sign in to comment.