Skip to content

Commit

Permalink
Merge pull request #8603 from thesahindia/thesahindia/onfido-page
Browse files Browse the repository at this point in the history
make onfido page scrollable
  • Loading branch information
AndrewGable authored Apr 18, 2022
2 parents 8908393 + 2dceb49 commit 8f65450
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/pages/ReimbursementAccount/RequestorStep.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import lodashGet from 'lodash/get';
import {View} from 'react-native';
import {ScrollView, View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import moment from 'moment';
Expand Down Expand Up @@ -155,24 +155,26 @@ class RequestorStep extends React.Component {
onCloseButtonPress={Navigation.dismissModal}
/>
{this.props.achData.useOnfido && this.props.achData.sdkToken && !this.state.isOnfidoSetupComplete ? (
<Onfido
sdkToken={this.props.achData.sdkToken}
onUserExit={() => {
<ScrollView contentContainerStyle={styles.flex1}>
<Onfido
sdkToken={this.props.achData.sdkToken}
onUserExit={() => {
// We're taking the user back to the company step. They will need to come back to the requestor step to make the Onfido flow appear again.
BankAccounts.goToWithdrawalAccountSetupStep(CONST.BANK_ACCOUNT.STEP.COMPANY);
}}
onError={() => {
BankAccounts.goToWithdrawalAccountSetupStep(CONST.BANK_ACCOUNT.STEP.COMPANY);
}}
onError={() => {
// In case of any unexpected error we log it to the server, show a growl, and return the user back to the company step so they can try again.
Growl.error(this.props.translate('onfidoStep.genericError'), 10000);
BankAccounts.goToWithdrawalAccountSetupStep(CONST.BANK_ACCOUNT.STEP.COMPANY);
}}
onSuccess={(onfidoData) => {
this.setState({
onfidoData,
isOnfidoSetupComplete: true,
}, this.submit);
}}
/>
Growl.error(this.props.translate('onfidoStep.genericError'), 10000);
BankAccounts.goToWithdrawalAccountSetupStep(CONST.BANK_ACCOUNT.STEP.COMPANY);
}}
onSuccess={(onfidoData) => {
this.setState({
onfidoData,
isOnfidoSetupComplete: true,
}, this.submit);
}}
/>
</ScrollView>
) : (
<ReimbursementAccountForm
onSubmit={this.submit}
Expand Down

0 comments on commit 8f65450

Please sign in to comment.