From 3666d38fd856c85d47654e75296ec23fecf9f4ee Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Wed, 14 Jun 2023 14:39:04 +0200 Subject: [PATCH 01/10] Handle Plaid events --- src/components/AddPlaidBankAccount.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index ff97c9be24a6..ff942b8a387e 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -184,6 +184,23 @@ class AddPlaidBankAccount extends React.Component { }} onError={(error) => { Log.hmmm('[PlaidLink] Error: ', error.message); + + // Handle Plaid login errors (will potentially reset plaid token and item depending on the error) + if (error.eventName === 'ERROR' && this.props.bankAccountID && error.error_code) { + API.write('BankAccount_HandlePlaidError', { + bankAccountID: this.props.bankAccountID, + error: error.error_code, + error_description: error.error_message, + plaidRequestID: error.request_id, + }); + } + + // Limit the number of times a user can submit Plaid credentials + if (error.eventName === 'SUBMIT_CREDENTIALS') { + API.write('HandleRestrictedEvent', { + eventName: error.eventName, + }); + } }} // User prematurely exited the Plaid flow // eslint-disable-next-line react/jsx-props-no-multi-spaces From 9fbcb49e3a533c8edacdd762e4b5d1bd1ba21676 Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Wed, 14 Jun 2023 15:03:10 +0200 Subject: [PATCH 02/10] Fix lint --- src/components/AddPlaidBankAccount.js | 12 +++--------- src/libs/actions/App.js | 7 +++++++ src/libs/actions/BankAccounts.js | 10 ++++++++++ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index ff942b8a387e..586c123a18df 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -6,6 +6,7 @@ import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; import Log from '../libs/Log'; import PlaidLink from './PlaidLink'; +import * as App from '../libs/actions/App'; import * as BankAccounts from '../libs/actions/BankAccounts'; import ONYXKEYS from '../ONYXKEYS'; import styles from '../styles/styles'; @@ -187,19 +188,12 @@ class AddPlaidBankAccount extends React.Component { // Handle Plaid login errors (will potentially reset plaid token and item depending on the error) if (error.eventName === 'ERROR' && this.props.bankAccountID && error.error_code) { - API.write('BankAccount_HandlePlaidError', { - bankAccountID: this.props.bankAccountID, - error: error.error_code, - error_description: error.error_message, - plaidRequestID: error.request_id, - }); + BankAccounts.handlePlaidError(this.props.bankAccountID, error.error_code, error.error_message,error.request_id); } // Limit the number of times a user can submit Plaid credentials if (error.eventName === 'SUBMIT_CREDENTIALS') { - API.write('HandleRestrictedEvent', { - eventName: error.eventName, - }); + App.handleRestrictedEvent(error.eventName); } }} // User prematurely exited the Plaid flow diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index ca03380368c2..600bd8bf8873 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -380,6 +380,12 @@ function beginDeepLinkRedirectAfterTransition() { waitForSignOnTransitionToFinish().then(beginDeepLinkRedirect); } +function handleRestrictedEvent(eventName) { + API.write('HandleRestrictedEvent', { + eventName, + }); +} + export { setLocale, setLocaleAndNavigate, @@ -389,6 +395,7 @@ export { openApp, reconnectApp, confirmReadyToOpenApp, + handleRestrictedEvent, beginDeepLinkRedirect, beginDeepLinkRedirectAfterTransition, createWorkspaceAndNavigateToIt, diff --git a/src/libs/actions/BankAccounts.js b/src/libs/actions/BankAccounts.js index 43e00c104f48..59cd40b5821c 100644 --- a/src/libs/actions/BankAccounts.js +++ b/src/libs/actions/BankAccounts.js @@ -401,6 +401,15 @@ function openWorkspaceView() { API.read('OpenWorkspaceView'); } +function handlePlaidError(bankAccountID, error, error_description, plaidRequestID) { + API.write('BankAccount_HandlePlaidError', { + bankAccountID, + error, + error_description, + plaidRequestID, + }); +} + /** * Set the reimbursement account loading so that it happens right away, instead of when the API command is processed. * @@ -419,6 +428,7 @@ export { connectBankAccountManually, connectBankAccountWithPlaid, deletePaymentBankAccount, + handlePlaidError, openPersonalBankAccountSetupView, openReimbursementAccountPage, updateBeneficialOwnersForBankAccount, From ec73541435a825cd7b74a872f170dc15903ae58e Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Fri, 11 Aug 2023 14:25:14 +0200 Subject: [PATCH 03/10] display any plaid throttle error --- src/languages/en.js | 1 + src/languages/es.js | 1 + src/pages/AddPersonalBankAccountPage.js | 26 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/src/languages/en.js b/src/languages/en.js index a3d5a85277af..3918887965e3 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -904,6 +904,7 @@ export default { hasPhoneLoginError: 'To add a verified bank account please ensure your primary login is a valid email and try again. You can add your phone number as a secondary login.', hasBeenThrottledError: 'There was an error adding your bank account. Please wait a few minutes and try again.', hasCurrencyError: 'Oops! It appears that your workspace currency is set to a different currency than USD. To proceed, please set it to USD and try again', + plaidThrottledError: 'Due to a high number of login attempts, this option has been temporarily disabled for 24 hours. Please try again later.', error: { noBankAccountAvailable: 'Sorry, no bank account is available', noBankAccountSelected: 'Please choose an account', diff --git a/src/languages/es.js b/src/languages/es.js index afc7aa7a7846..826ce49a985f 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -910,6 +910,7 @@ export default { hasBeenThrottledError: 'Se produjo un error al intentar añadir tu cuenta bancaria. Por favor, espera unos minutos e inténtalo de nuevo.', hasCurrencyError: '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente a USD. Para continuar, por favor configúrala en USD e inténtalo nuevamente.', + plaidThrottledError: 'Debido a la gran cantidad de intentos de inicio de sesión, esta opción ha sido desactivada temporalmente durante 24 horas. Por favor, inténtela de nuevo más tarde.', error: { noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', noBankAccountSelected: 'Por favor, elige una cuenta bancaria', diff --git a/src/pages/AddPersonalBankAccountPage.js b/src/pages/AddPersonalBankAccountPage.js index 96140b33928f..fcd5963c94cf 100644 --- a/src/pages/AddPersonalBankAccountPage.js +++ b/src/pages/AddPersonalBankAccountPage.js @@ -17,10 +17,16 @@ import Form from '../components/Form'; import ROUTES from '../ROUTES'; import * as PlaidDataProps from './ReimbursementAccount/plaidDataPropTypes'; import ConfirmationPage from '../components/ConfirmationPage'; +import Text from "../components/Text"; +import TextLink from "../components/TextLink"; +import {View} from "react-native"; const propTypes = { ...withLocalizePropTypes, + /** If the user has been throttled from Plaid */ + isPlaidDisabled: PropTypes.bool, + /** Contains plaid data */ plaidData: PlaidDataProps.plaidDataPropTypes, @@ -44,6 +50,7 @@ const propTypes = { }; const defaultProps = { + isPlaidDisabled: false, plaidData: PlaidDataProps.plaidDataDefaultProps, personalBankAccount: { error: '', @@ -98,6 +105,22 @@ class AddPersonalBankAccountPage extends React.Component { render() { const shouldShowSuccess = lodashGet(this.props, 'personalBankAccount.shouldShowSuccess', false); + if (this.props.isPlaidDisabled) { + return ( + + Navigation.goBack(ROUTES.SETTINGS_PAYMENTS)} + /> + + + {this.props.translate('bankAccount.plaidThrottledError')} + + + + ); + } + return ( Date: Tue, 15 Aug 2023 09:11:29 +0200 Subject: [PATCH 04/10] Reuse existing translation --- src/languages/en.js | 1 - src/languages/es.js | 1 - src/pages/AddPersonalBankAccountPage.js | 7 +++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 3918887965e3..a3d5a85277af 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -904,7 +904,6 @@ export default { hasPhoneLoginError: 'To add a verified bank account please ensure your primary login is a valid email and try again. You can add your phone number as a secondary login.', hasBeenThrottledError: 'There was an error adding your bank account. Please wait a few minutes and try again.', hasCurrencyError: 'Oops! It appears that your workspace currency is set to a different currency than USD. To proceed, please set it to USD and try again', - plaidThrottledError: 'Due to a high number of login attempts, this option has been temporarily disabled for 24 hours. Please try again later.', error: { noBankAccountAvailable: 'Sorry, no bank account is available', noBankAccountSelected: 'Please choose an account', diff --git a/src/languages/es.js b/src/languages/es.js index 826ce49a985f..afc7aa7a7846 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -910,7 +910,6 @@ export default { hasBeenThrottledError: 'Se produjo un error al intentar añadir tu cuenta bancaria. Por favor, espera unos minutos e inténtalo de nuevo.', hasCurrencyError: '¡Ups! Parece que la moneda de tu espacio de trabajo está configurada en una moneda diferente a USD. Para continuar, por favor configúrala en USD e inténtalo nuevamente.', - plaidThrottledError: 'Debido a la gran cantidad de intentos de inicio de sesión, esta opción ha sido desactivada temporalmente durante 24 horas. Por favor, inténtela de nuevo más tarde.', error: { noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', noBankAccountSelected: 'Por favor, elige una cuenta bancaria', diff --git a/src/pages/AddPersonalBankAccountPage.js b/src/pages/AddPersonalBankAccountPage.js index fcd5963c94cf..dc36b87a44b2 100644 --- a/src/pages/AddPersonalBankAccountPage.js +++ b/src/pages/AddPersonalBankAccountPage.js @@ -3,6 +3,7 @@ import React from 'react'; import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; +import {View} from 'react-native'; import HeaderWithBackButton from '../components/HeaderWithBackButton'; import ScreenWrapper from '../components/ScreenWrapper'; import Navigation from '../libs/Navigation/Navigation'; @@ -17,9 +18,7 @@ import Form from '../components/Form'; import ROUTES from '../ROUTES'; import * as PlaidDataProps from './ReimbursementAccount/plaidDataPropTypes'; import ConfirmationPage from '../components/ConfirmationPage'; -import Text from "../components/Text"; -import TextLink from "../components/TextLink"; -import {View} from "react-native"; +import Text from '../components/Text'; const propTypes = { ...withLocalizePropTypes, @@ -114,7 +113,7 @@ class AddPersonalBankAccountPage extends React.Component { /> - {this.props.translate('bankAccount.plaidThrottledError')} + {this.props.translate('bankAccount.tooManyAttempts')} From 0ffe4be747151927ca05257d395e474052d1f243 Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Tue, 15 Aug 2023 09:16:40 +0200 Subject: [PATCH 05/10] prettier --- src/components/AddPlaidBankAccount.js | 2 +- src/pages/AddPersonalBankAccountPage.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 586c123a18df..707d329c5560 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -188,7 +188,7 @@ class AddPlaidBankAccount extends React.Component { // Handle Plaid login errors (will potentially reset plaid token and item depending on the error) if (error.eventName === 'ERROR' && this.props.bankAccountID && error.error_code) { - BankAccounts.handlePlaidError(this.props.bankAccountID, error.error_code, error.error_message,error.request_id); + BankAccounts.handlePlaidError(this.props.bankAccountID, error.error_code, error.error_message, error.request_id); } // Limit the number of times a user can submit Plaid credentials diff --git a/src/pages/AddPersonalBankAccountPage.js b/src/pages/AddPersonalBankAccountPage.js index dc36b87a44b2..de166230282e 100644 --- a/src/pages/AddPersonalBankAccountPage.js +++ b/src/pages/AddPersonalBankAccountPage.js @@ -112,9 +112,7 @@ class AddPersonalBankAccountPage extends React.Component { onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_PAYMENTS)} /> - - {this.props.translate('bankAccount.tooManyAttempts')} - + {this.props.translate('bankAccount.tooManyAttempts')} ); From 9ebcf21b1f4152159335fa37646996eedd061d90 Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Tue, 15 Aug 2023 10:26:55 +0200 Subject: [PATCH 06/10] Fix event catcher --- src/components/AddPlaidBankAccount.js | 14 +++++++++----- src/components/PlaidLink/index.js | 1 + src/components/PlaidLink/index.native.js | 3 +++ src/components/PlaidLink/plaidLinkPropTypes.js | 3 +++ src/pages/AddPersonalBankAccountPage.js | 2 +- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 707d329c5560..bd4867db4aef 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -185,15 +185,19 @@ class AddPlaidBankAccount extends React.Component { }} onError={(error) => { Log.hmmm('[PlaidLink] Error: ', error.message); - + }} + onEvent={(event, metadata) => { // Handle Plaid login errors (will potentially reset plaid token and item depending on the error) - if (error.eventName === 'ERROR' && this.props.bankAccountID && error.error_code) { - BankAccounts.handlePlaidError(this.props.bankAccountID, error.error_code, error.error_message, error.request_id); + if (event === 'ERROR') { + Log.hmmm('[PlaidLink] Error: ', metadata); + if (this.props.bankAccountID && metadata.error_code) { + BankAccounts.handlePlaidError(this.props.bankAccountID, metadata.error_code, metadata.error_message, metadata.request_id); + } } // Limit the number of times a user can submit Plaid credentials - if (error.eventName === 'SUBMIT_CREDENTIALS') { - App.handleRestrictedEvent(error.eventName); + if (event === 'SUBMIT_CREDENTIALS') { + App.handleRestrictedEvent(event); } }} // User prematurely exited the Plaid flow diff --git a/src/components/PlaidLink/index.js b/src/components/PlaidLink/index.js index f1227bd15c68..319d13923996 100644 --- a/src/components/PlaidLink/index.js +++ b/src/components/PlaidLink/index.js @@ -23,6 +23,7 @@ function PlaidLink(props) { }, onEvent: (event, metadata) => { Log.info('[PlaidLink] Event: ', false, {event, metadata}); + props.onEvent(event, metadata); }, onLoad: () => setIsPlaidLoaded(true), diff --git a/src/components/PlaidLink/index.native.js b/src/components/PlaidLink/index.native.js index 402fbe22d64c..cd17453820cf 100644 --- a/src/components/PlaidLink/index.native.js +++ b/src/components/PlaidLink/index.native.js @@ -20,6 +20,9 @@ function PlaidLink(props) { onSuccess: ({publicToken, metadata}) => { props.onSuccess({publicToken, metadata}); }, + onEvent: (event, metadata) => { + props.onEvent(event, metadata); + }, onExit: (exitError, metadata) => { Log.info('[PlaidLink] Exit: ', false, {exitError, metadata}); props.onExit(); diff --git a/src/components/PlaidLink/plaidLinkPropTypes.js b/src/components/PlaidLink/plaidLinkPropTypes.js index 6bcd103fc336..6d647d26f17e 100644 --- a/src/components/PlaidLink/plaidLinkPropTypes.js +++ b/src/components/PlaidLink/plaidLinkPropTypes.js @@ -13,6 +13,9 @@ const plaidLinkPropTypes = { // Callback to execute when the user leaves the Plaid widget flow without entering any information onExit: PropTypes.func, + // Callback to execute whenever a Plaid event occurs + onEvent: PropTypes.func, + // The redirect URI with an OAuth state ID. Needed to re-initialize the PlaidLink after directing the // user to their respective bank platform receivedRedirectURI: PropTypes.string, diff --git a/src/pages/AddPersonalBankAccountPage.js b/src/pages/AddPersonalBankAccountPage.js index de166230282e..82a4b10f07e7 100644 --- a/src/pages/AddPersonalBankAccountPage.js +++ b/src/pages/AddPersonalBankAccountPage.js @@ -112,7 +112,7 @@ class AddPersonalBankAccountPage extends React.Component { onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_PAYMENTS)} /> - {this.props.translate('bankAccount.tooManyAttempts')} + {this.props.translate('bankAccount.error.tooManyAttempts')} ); From 2424edc813969038c5dd4300de641edb7dc25b66 Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Tue, 15 Aug 2023 14:51:32 +0200 Subject: [PATCH 07/10] Fix disabled --- src/components/AddPlaidBankAccount.js | 11 +++++++++++ src/languages/es.js | 2 +- src/pages/AddPersonalBankAccountPage.js | 17 ----------------- .../ReimbursementAccount/BankAccountStep.js | 9 +++++++-- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index bd4867db4aef..573f7697d7ac 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -163,6 +163,14 @@ class AddPlaidBankAccount extends React.Component { const plaidDataErrorMessage = !_.isEmpty(plaidErrors) ? _.chain(plaidErrors).values().first().value() : ''; const bankName = lodashGet(this.props.plaidData, 'bankName'); + if (this.props.isPlaidDisabled) { + return ( + + {this.props.translate('bankAccount.error.tooManyAttempts')} + + ); + } + // Plaid Link view if (!plaidBankAccounts.length) { return ( @@ -250,5 +258,8 @@ export default compose( key: ONYXKEYS.PLAID_LINK_TOKEN, initWithStoredValues: false, }, + isPlaidDisabled: { + key: ONYXKEYS.IS_PLAID_DISABLED, + }, }), )(AddPlaidBankAccount); diff --git a/src/languages/es.js b/src/languages/es.js index afc7aa7a7846..7d7c83435992 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -930,7 +930,7 @@ export default { routingAndAccountNumberCannotBeSame: 'El número de ruta y el número de cuenta no pueden ser iguales', companyType: 'Por favor, selecciona un tipo de compañía válido', tooManyAttempts: - 'Debido a la gran cantidad de intentos de inicio de sesión, esta opción se ha desactivado temporalmente durante 24 horas. Vuelve a intentarlo más tarde o introduce los detalles manualmente.', + 'Debido a la gran cantidad de intentos de inicio de sesión, esta opción ha sido desactivada temporalmente durante 24 horas. Por favor, inténtalo de nuevo más tarde.', address: 'Por favor, introduce una dirección válida', dob: 'Por favor, selecciona una fecha de nacimiento válida', age: 'Debe ser mayor de 18 años', diff --git a/src/pages/AddPersonalBankAccountPage.js b/src/pages/AddPersonalBankAccountPage.js index 82a4b10f07e7..ca3c9dfe8134 100644 --- a/src/pages/AddPersonalBankAccountPage.js +++ b/src/pages/AddPersonalBankAccountPage.js @@ -104,20 +104,6 @@ class AddPersonalBankAccountPage extends React.Component { render() { const shouldShowSuccess = lodashGet(this.props, 'personalBankAccount.shouldShowSuccess', false); - if (this.props.isPlaidDisabled) { - return ( - - Navigation.goBack(ROUTES.SETTINGS_PAYMENTS)} - /> - - {this.props.translate('bankAccount.error.tooManyAttempts')} - - - ); - } - return ( BankAccounts.openPlaidView()} - disabled={props.isPlaidDisabled || !props.user.validated} + onPress={() => { + if (props.isPlaidDisabled || !props.user.validated) { + return; + } + BankAccounts.openPlaidView(); + }} + isDisabled={props.isPlaidDisabled || !props.user.validated} style={[styles.mt4]} iconStyles={[styles.buttonCTAIcon]} shouldShowRightIcon From 56aed09120574c5c06f0be7f3e9228a1df825703 Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Tue, 15 Aug 2023 14:56:40 +0200 Subject: [PATCH 08/10] Fix js style --- src/components/AddPlaidBankAccount.js | 4 ++++ src/pages/AddPersonalBankAccountPage.js | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 573f7697d7ac..514c5685fbd2 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -24,6 +24,9 @@ import CONST from '../CONST'; import KeyboardShortcut from '../libs/KeyboardShortcut'; const propTypes = { + /** If the user has been throttled from Plaid */ + isPlaidDisabled: PropTypes.bool, + /** Contains plaid data */ plaidData: plaidDataPropTypes.isRequired, @@ -67,6 +70,7 @@ const defaultProps = { plaidLinkOAuthToken: '', allowDebit: false, bankAccountID: 0, + isPlaidDisabled: false, }; class AddPlaidBankAccount extends React.Component { diff --git a/src/pages/AddPersonalBankAccountPage.js b/src/pages/AddPersonalBankAccountPage.js index ca3c9dfe8134..96140b33928f 100644 --- a/src/pages/AddPersonalBankAccountPage.js +++ b/src/pages/AddPersonalBankAccountPage.js @@ -3,7 +3,6 @@ import React from 'react'; import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; import PropTypes from 'prop-types'; -import {View} from 'react-native'; import HeaderWithBackButton from '../components/HeaderWithBackButton'; import ScreenWrapper from '../components/ScreenWrapper'; import Navigation from '../libs/Navigation/Navigation'; @@ -18,14 +17,10 @@ import Form from '../components/Form'; import ROUTES from '../ROUTES'; import * as PlaidDataProps from './ReimbursementAccount/plaidDataPropTypes'; import ConfirmationPage from '../components/ConfirmationPage'; -import Text from '../components/Text'; const propTypes = { ...withLocalizePropTypes, - /** If the user has been throttled from Plaid */ - isPlaidDisabled: PropTypes.bool, - /** Contains plaid data */ plaidData: PlaidDataProps.plaidDataPropTypes, @@ -49,7 +44,6 @@ const propTypes = { }; const defaultProps = { - isPlaidDisabled: false, plaidData: PlaidDataProps.plaidDataDefaultProps, personalBankAccount: { error: '', From 9f047e985b8bc304f747aeaff58f9da126e10627 Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Sun, 27 Aug 2023 09:29:20 +0300 Subject: [PATCH 09/10] Remove useless margins --- src/components/AddPlaidBankAccount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 04f8e4788ded..e30d7e773827 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -161,7 +161,7 @@ function AddPlaidBankAccount({plaidData, selectedPlaidAccountID, plaidLinkToken, if (isPlaidDisabled) { return ( - + {translate('bankAccount.error.tooManyAttempts')} ); From 87707d583ef5dd77b36a84f339fce7ecceda9f99 Mon Sep 17 00:00:00 2001 From: Nathalie Kuoch Date: Sun, 27 Aug 2023 09:30:00 +0300 Subject: [PATCH 10/10] prettier --- src/components/AddPlaidBankAccount.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index e30d7e773827..dbe7e46ff6aa 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -70,7 +70,19 @@ const defaultProps = { isPlaidDisabled: false, }; -function AddPlaidBankAccount({plaidData, selectedPlaidAccountID, plaidLinkToken, onExitPlaid, onSelect, text, receivedRedirectURI, plaidLinkOAuthToken, bankAccountID, allowDebit, isPlaidDisabled}) { +function AddPlaidBankAccount({ + plaidData, + selectedPlaidAccountID, + plaidLinkToken, + onExitPlaid, + onSelect, + text, + receivedRedirectURI, + plaidLinkOAuthToken, + bankAccountID, + allowDebit, + isPlaidDisabled, +}) { const subscribedKeyboardShortcuts = useRef([]); const previousNetworkState = useRef();