Skip to content

Commit

Permalink
add completePaymentOnboarding into AddPaymentMethodMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
cdOut committed Oct 2, 2024
1 parent 9627f5f commit c9198e5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/AddPaymentMethodMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import * as Expensicons from './Icon/Expensicons';
import type {PaymentMethod} from './KYCWall/types';
import type BaseModalProps from './Modal/types';
import PopoverMenu from './PopoverMenu';

Check failure on line 17 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Delete `';⏎import·{·completePaymentOnboarding·}·from·'@libs/actions/IOU`

Check failure on line 17 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Delete `';⏎import·{·completePaymentOnboarding·}·from·'@libs/actions/IOU`
import { completePaymentOnboarding } from '@libs/actions/IOU';

Check failure on line 18 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

`@libs/actions/IOU` import should occur before import of `./Icon/Expensicons`

Check failure on line 18 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

`@libs/actions/IOU` import should occur before import of `./Icon/Expensicons`

type AddPaymentMethodMenuOnyxProps = {
/** Session info for the currently logged-in user. */
Expand Down Expand Up @@ -80,6 +81,7 @@ function AddPaymentMethodMenu({
return;
}

completePaymentOnboarding(CONST.PAYMENT_SELECTED.PBA);
onItemSelected(CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT);
}, [isPersonalOnlyOption, isVisible, onItemSelected]);

Expand Down Expand Up @@ -108,7 +110,8 @@ function AddPaymentMethodMenu({
text: translate('common.personalBankAccount'),
icon: Expensicons.Bank,
onSelected: () => {
onItemSelected(CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT);
completePaymentOnboarding(CONST.PAYMENT_SELECTED.PBA);

Check failure on line 113 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Insert `··`

Check failure on line 113 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Insert `··`
onItemSelected(CONST.PAYMENT_METHODS.PERSONAL_BANK_ACCOUNT);

Check failure on line 114 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Insert `··`

Check failure on line 114 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Insert `··`
},
},
]
Expand All @@ -118,7 +121,10 @@ function AddPaymentMethodMenu({
{
text: translate('common.businessBankAccount'),
icon: Expensicons.Building,
onSelected: () => onItemSelected(CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT),
onSelected: () => {
completePaymentOnboarding(CONST.PAYMENT_SELECTED.BBA);

Check failure on line 125 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Insert `··`

Check failure on line 125 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Insert `··`
onItemSelected(CONST.PAYMENT_METHODS.BUSINESS_BANK_ACCOUNT);

Check failure on line 126 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Insert `··`

Check failure on line 126 in src/components/AddPaymentMethodMenu.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Insert `··`
},
},
]
: []),
Expand Down

0 comments on commit c9198e5

Please sign in to comment.