From 27014eb72e2a28a6d284829a8903e34f409cbe2e Mon Sep 17 00:00:00 2001 From: sahil Date: Tue, 12 Apr 2022 15:46:24 +0530 Subject: [PATCH 1/2] make onfido page scrollable --- .../ReimbursementAccount/RequestorStep.js | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/pages/ReimbursementAccount/RequestorStep.js b/src/pages/ReimbursementAccount/RequestorStep.js index 04237bda2c21..973eb54c8c53 100644 --- a/src/pages/ReimbursementAccount/RequestorStep.js +++ b/src/pages/ReimbursementAccount/RequestorStep.js @@ -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'; @@ -155,24 +155,30 @@ class RequestorStep extends React.Component { onCloseButtonPress={Navigation.dismissModal} /> {this.props.achData.useOnfido && this.props.achData.sdkToken && !this.state.isOnfidoSetupComplete ? ( - { + + { // 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); + }} + /> + ) : ( Date: Tue, 12 Apr 2022 21:40:47 +0530 Subject: [PATCH 2/2] use flex 1 --- src/pages/ReimbursementAccount/RequestorStep.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/ReimbursementAccount/RequestorStep.js b/src/pages/ReimbursementAccount/RequestorStep.js index 973eb54c8c53..a48b2e900b14 100644 --- a/src/pages/ReimbursementAccount/RequestorStep.js +++ b/src/pages/ReimbursementAccount/RequestorStep.js @@ -155,11 +155,7 @@ class RequestorStep extends React.Component { onCloseButtonPress={Navigation.dismissModal} /> {this.props.achData.useOnfido && this.props.achData.sdkToken && !this.state.isOnfidoSetupComplete ? ( - + {