Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions src/components/SelectionListWithSections/Search/ActionCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Badge from '@components/Badge';
import Button from '@components/Button';
import * as Expensicons from '@components/Icon/Expensicons';
import type {PaymentMethod} from '@components/KYCWall/types';
import {SearchScopeProvider} from '@components/Search/SearchScopeProvider';
import type {PaymentData} from '@components/Search/types';
import SettlementButton from '@components/SettlementButton';
import useLocalize from '@hooks/useLocalize';
Expand Down Expand Up @@ -150,24 +151,26 @@ function ActionCell({

if (action === CONST.SEARCH.ACTION_TYPES.PAY) {
return (
<SettlementButton
shouldUseShortForm
buttonSize={extraSmall ? CONST.DROPDOWN_BUTTON_SIZE.EXTRA_SMALL : CONST.DROPDOWN_BUTTON_SIZE.SMALL}
currency={currency}
formattedAmount={convertToDisplayString(Math.abs(iouReport?.total ?? 0), currency)}
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
policyID={policyID || iouReport?.policyID}
iouReport={iouReport}
chatReportID={iouReport?.chatReportID}
enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS}
onPress={(type, payAsBusiness, methodID, paymentMethod) => confirmPayment(type as ValueOf<typeof CONST.IOU.PAYMENT_TYPE>, payAsBusiness, methodID, paymentMethod)}
style={[styles.w100]}
wrapperStyle={[styles.w100]}
shouldShowPersonalBankAccountOption={!policyID && !iouReport?.policyID}
isDisabled={isOffline}
isLoading={isLoading}
onlyShowPayElsewhere={shouldOnlyShowElsewhere}
/>
<SearchScopeProvider isOnSearch={false}>
<SettlementButton
shouldUseShortForm
buttonSize={extraSmall ? CONST.DROPDOWN_BUTTON_SIZE.EXTRA_SMALL : CONST.DROPDOWN_BUTTON_SIZE.SMALL}
currency={currency}
formattedAmount={convertToDisplayString(Math.abs(iouReport?.total ?? 0), currency)}
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
policyID={policyID || iouReport?.policyID}
iouReport={iouReport}
chatReportID={iouReport?.chatReportID}
enablePaymentsRoute={ROUTES.ENABLE_PAYMENTS}
onPress={(type, payAsBusiness, methodID, paymentMethod) => confirmPayment(type as ValueOf<typeof CONST.IOU.PAYMENT_TYPE>, payAsBusiness, methodID, paymentMethod)}
style={[styles.w100]}
wrapperStyle={[styles.w100]}
shouldShowPersonalBankAccountOption={!policyID && !iouReport?.policyID}
isDisabled={isOffline}
isLoading={isLoading}
onlyShowPayElsewhere={shouldOnlyShowElsewhere}
/>
</SearchScopeProvider>
);
}

Expand Down
Loading