Skip to content

Commit

Permalink
Merge pull request #29950 from barttom/fix/29868/requestor-onfido-pro…
Browse files Browse the repository at this point in the history
…ps-warnings

Fix/29868/requestor onfido props warnings
  • Loading branch information
tylerkaraszewski authored Oct 23, 2023
2 parents e151ac1 + 709992f commit b535caf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/pages/ReimbursementAccount/ReimbursementAccountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ class ReimbursementAccountPage extends React.Component {
<RequestorStep
ref={this.requestorStepRef}
reimbursementAccount={this.props.reimbursementAccount}
reimbursementAccountDraft={this.props.reimbursementAccountDraft}
onBackButtonPress={this.goBack}
shouldShowOnfido={Boolean(shouldShowOnfido)}
getDefaultStateForField={this.getDefaultStateForField}
Expand Down
8 changes: 6 additions & 2 deletions src/pages/ReimbursementAccount/RequestorOnfidoStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ import ONYXKEYS from '../../ONYXKEYS';
import Growl from '../../libs/Growl';
import CONST from '../../CONST';
import FullPageOfflineBlockingView from '../../components/BlockingViews/FullPageOfflineBlockingView';
import StepPropTypes from './StepPropTypes';
import HeaderWithBackButton from '../../components/HeaderWithBackButton';
import ScreenWrapper from '../../components/ScreenWrapper';
import useLocalize from '../../hooks/useLocalize';
import * as ReimbursementAccountProps from './reimbursementAccountPropTypes';

const propTypes = {
...StepPropTypes,
/** The bank account currently in setup */
reimbursementAccount: ReimbursementAccountProps.reimbursementAccountPropTypes.isRequired,

/** Goes to the previous step */
onBackButtonPress: PropTypes.func.isRequired,

/** The token required to initialize the Onfido SDK */
onfidoToken: PropTypes.string,
Expand Down
6 changes: 1 addition & 5 deletions src/pages/ReimbursementAccount/RequestorStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ import Form from '../../components/Form';
import ScreenWrapper from '../../components/ScreenWrapper';
import useLocalize from '../../hooks/useLocalize';
import {reimbursementAccountPropTypes} from './reimbursementAccountPropTypes';
import ReimbursementAccountDraftPropTypes from './ReimbursementAccountDraftPropTypes';

const propTypes = {
onBackButtonPress: PropTypes.func.isRequired,
getDefaultStateForField: PropTypes.func.isRequired,
reimbursementAccount: reimbursementAccountPropTypes.isRequired,
reimbursementAccountDraft: ReimbursementAccountDraftPropTypes.isRequired,

/** If we should show Onfido flow */
shouldShowOnfido: PropTypes.bool.isRequired,
Expand Down Expand Up @@ -72,7 +70,7 @@ const validate = (values) => {
return errors;
};

function RequestorStep({reimbursementAccount, shouldShowOnfido, reimbursementAccountDraft, onBackButtonPress, getDefaultStateForField}) {
function RequestorStep({reimbursementAccount, shouldShowOnfido, onBackButtonPress, getDefaultStateForField}) {
const {translate} = useLocalize();

const defaultValues = useMemo(
Expand Down Expand Up @@ -111,9 +109,7 @@ function RequestorStep({reimbursementAccount, shouldShowOnfido, reimbursementAcc
return (
<RequestorOnfidoStep
reimbursementAccount={reimbursementAccount}
reimbursementAccountDraft={reimbursementAccountDraft}
onBackButtonPress={onBackButtonPress}
getDefaultStateForField={getDefaultStateForField}
/>
);
}
Expand Down

0 comments on commit b535caf

Please sign in to comment.