From fdf1bc512d58b811c15ec8df87b872897febfa6c Mon Sep 17 00:00:00 2001 From: Santhoshkumar Sellavel Date: Thu, 5 Aug 2021 03:31:42 +0530 Subject: [PATCH] Method removed, as per changes requested --- src/pages/iou/IOUModal.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/pages/iou/IOUModal.js b/src/pages/iou/IOUModal.js index 1b6bd1f152e6..65fc2cbd4184 100755 --- a/src/pages/iou/IOUModal.js +++ b/src/pages/iou/IOUModal.js @@ -101,7 +101,6 @@ class IOUModal extends Component { this.addParticipants = this.addParticipants.bind(this); this.createTransaction = this.createTransaction.bind(this); this.updateComment = this.updateComment.bind(this); - this.handleTransactionError = this.handleTransactionError.bind(this); const participants = lodashGet(props, 'report.participants', []); const participantsWithDetails = getPersonalDetailsForLogins(participants, props.personalDetails) .map(personalDetails => ({ @@ -143,7 +142,9 @@ class IOUModal extends Component { // If transaction fails, handling it here if (prevProps.iou.creatingIOUTransaction && this.props.iou.error === true) { - this.handleTransactionError(); + // Navigating to Enter Amount Page + // eslint-disable-next-line react/no-did-update-set-state + this.setState({currentStepIndex: 0}); } if (prevProps.iou.selectedCurrencyCode @@ -254,11 +255,6 @@ class IOUModal extends Component { }); } - handleTransactionError() { - // Navigating to Enter Amount Page - this.setState({currentStepIndex: 0}); - } - render() { const currentStep = this.steps[this.state.currentStepIndex]; const reportID = lodashGet(this.props, 'route.params.reportID', '');