Skip to content

Commit 2abff25

Browse files
committed
iterate
1 parent 06c635a commit 2abff25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1204
-800
lines changed

components/contribution-flow/ContributionFlowSuccess.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { QueryResult } from '@apollo/client';
33
import { graphql } from '@apollo/client/react/hoc';
44
import type { PaymentIntentResult } from '@stripe/stripe-js';
55
import { get, uniqBy } from 'lodash';
6-
import { Clock } from 'lucide-react';
76
import type { NextRouter } from 'next/router';
87
import { withRouter } from 'next/router';
98
import type { IntlShape } from 'react-intl';
@@ -40,9 +39,9 @@ import { withUser } from '../../components/UserProvider';
4039

4140
import { isValidExternalRedirect } from '../../pages/external-redirect';
4241
import Avatar from '../Avatar';
43-
import { CustomPaymentMethodInstructions } from '../custom-payment-provider/CustomPaymentMethodInstructions';
44-
import { getCustomPaymentProviderIconComponent } from '../custom-payment-provider/CustomPaymentProviderIcon';
4542
import Link from '../Link';
43+
import { CustomPaymentMethodInstructions } from '../manual-payment-provider/CustomPaymentMethodInstructions';
44+
import { getManualPaymentProviderIconComponent } from '../manual-payment-provider/ManualPaymentProviderIcon';
4645
import { Survey, SURVEY_KEY } from '../Survey';
4746
import { Badge } from '../ui/Badge';
4847
import { Button } from '../ui/Button';
@@ -317,7 +316,7 @@ class ContributionFlowSuccess extends React.Component<
317316
const platformTipAmount = order.platformTipAmount.valueInCents;
318317
const totalAmount = amount + platformTipAmount;
319318
const currency = order.amount.currency;
320-
const IconComponent = manualPaymentProvider && getCustomPaymentProviderIconComponent(manualPaymentProvider);
319+
const IconComponent = manualPaymentProvider && getManualPaymentProviderIconComponent(manualPaymentProvider);
321320

322321
return (
323322
<div
@@ -362,6 +361,7 @@ class ContributionFlowSuccess extends React.Component<
362361
amount: { valueInCents: totalAmount, currency },
363362
collectiveSlug: get(data, 'order.toAccount.name', ''),
364363
OrderId: get(data, 'order.legacyId', 0),
364+
accountDetails: manualPaymentProvider.accountDetails,
365365
}}
366366
/>
367367
</div>
@@ -391,7 +391,7 @@ class ContributionFlowSuccess extends React.Component<
391391
const { order } = data;
392392
const shareURL = `${getWebsiteUrl()}/${collective.slug}`;
393393
const isProcessing = order?.status === ORDER_STATUS.PROCESSING;
394-
const isPendingBankTransfer = order?.status === ORDER_STATUS.PENDING && !order.paymentMethod;
394+
const isPendingManualContribution = order?.status === ORDER_STATUS.PENDING && !order.paymentMethod;
395395

396396
const loading = data.loading || !this.state?.loaded;
397397

@@ -406,7 +406,7 @@ class ContributionFlowSuccess extends React.Component<
406406
}
407407

408408
// Show dedicated pending layout for bank transfer contributions
409-
if (!loading && isPendingBankTransfer) {
409+
if (!loading && isPendingManualContribution) {
410410
return this.renderPendingView();
411411
}
412412

components/contribution-flow/graphql/fragments.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ export const orderSuccessFragment = gql`
121121
data
122122
manualPaymentProvider {
123123
id
124+
type
124125
name
125126
instructions
126127
icon
128+
accountDetails
127129
}
128130
amount {
129131
value

components/contribution-flow/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import {
2222
import { StripePaymentMethodsLabels } from '../../lib/stripe/payment-methods';
2323
import { getWebsiteUrl } from '../../lib/utils';
2424

25-
import { getCustomPaymentProviderIconComponent } from '../custom-payment-provider/CustomPaymentProviderIcon';
2625
import CreditCardInactive from '../icons/CreditCardInactive';
26+
import { getManualPaymentProviderIconComponent } from '../manual-payment-provider/ManualPaymentProviderIcon';
2727

2828
export const NEW_CREDIT_CARD_KEY = 'newCreditCard';
2929
export const STRIPE_PAYMENT_ELEMENT_KEY = 'stripe-payment-element';
@@ -232,7 +232,7 @@ export const generatePaymentMethodOptions = (
232232
!disabledPaymentMethodTypes?.includes(PAYMENT_METHOD_TYPE.MANUAL)
233233
) {
234234
manualPaymentProviders.forEach(provider => {
235-
const Icon = getCustomPaymentProviderIconComponent(provider);
235+
const Icon = getManualPaymentProviderIconComponent(provider);
236236
uniquePMs.push({
237237
key: `custom-${provider.id}`,
238238
title: provider.name,

0 commit comments

Comments
 (0)