Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
war-in committed Mar 19, 2024
1 parent b2b840c commit 6d06a30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/components/AddPaymentMethodMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React from 'react';
import type {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import type {ValueOf} from 'type-fest';
import useLocalize from '@hooks/useLocalize';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import * as ReportUtils from '@libs/ReportUtils';
Expand All @@ -12,7 +11,9 @@ import ONYXKEYS from '@src/ONYXKEYS';
import type {AnchorPosition} from '@src/styles';
import type {Report, Session} from '@src/types/onyx';
import type AnchorAlignment from '@src/types/utils/AnchorAlignment';
import type {EmptyObject} from '@src/types/utils/EmptyObject';
import * as Expensicons from './Icon/Expensicons';
import type {PaymentMethod} from './KYCWall/types';
import PopoverMenu from './PopoverMenu';

type AddPaymentMethodMenuOnyxProps = {
Expand All @@ -28,10 +29,10 @@ type AddPaymentMethodMenuProps = AddPaymentMethodMenuOnyxProps & {
onClose: () => void;

/** Callback to execute when the payment method is selected. */
onItemSelected: (paymentMethod: ValueOf<typeof CONST.PAYMENT_METHODS>) => void;
onItemSelected: (paymentMethod: PaymentMethod) => void;

/** The IOU/Expense report we are paying */
iouReport?: OnyxEntry<Report>;
iouReport?: OnyxEntry<Report> | EmptyObject;

/** Anchor position for the AddPaymentMenu. */
anchorPosition: AnchorPosition;
Expand Down
3 changes: 1 addition & 2 deletions src/components/KYCWall/BaseKYCWall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type {BankAccountList, FundList, ReimbursementAccount, UserWallet, WalletTerms} from '@src/types/onyx';
import type {PaymentMethodType} from '@src/types/onyx/OriginalMessage';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import viewRef from '@src/types/utils/viewRef';
import type {AnchorPosition, DomRect, KYCWallProps, PaymentMethod} from './types';

Expand Down Expand Up @@ -247,7 +246,7 @@ function KYCWall({
<>
<AddPaymentMethodMenu
isVisible={shouldShowAddPaymentMenu}
iouReport={isEmptyObject(iouReport) ? undefined : iouReport}
iouReport={iouReport}
onClose={() => setShouldShowAddPaymentMenu(false)}
anchorRef={anchorRef}
anchorPosition={{
Expand Down

0 comments on commit 6d06a30

Please sign in to comment.