Skip to content

Commit

Permalink
[PAY-2488] Remove stripe option from purchase flow (#7755)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson authored Mar 1, 2024
1 parent 4931acb commit e1dd6e0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/services/remote-config/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const remoteConfigIntDefaults: { [key in IntKeys]: number | null } = {
[IntKeys.CACHE_ENTRY_TTL]: DEFAULT_ENTRY_TTL,
[IntKeys.HANDLE_VERIFICATION_TIMEOUT_MILLIS]:
DEFAULT_HANDLE_VERIFICATION_TIMEOUT_MILLIS,
[IntKeys.COINFLOW_MAXIMUM_CENTS]: 1000,
[IntKeys.COINFLOW_MAXIMUM_CENTS]: 11000,
[IntKeys.MIN_USDC_WITHDRAW_BALANCE_CENTS]: 500,
[IntKeys.BUY_SOL_WITH_TOKEN_SLIPPAGE_BPS]: BUY_SOL_VIA_TOKEN_SLIPPAGE_BPS
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const AddFundsDrawer = () => {
<PaymentMethod
selectedMethod={selectedPurchaseMethod}
setSelectedMethod={setSelectedPurchaseMethod}
showVendorChoice
/>
<Button
title={messages.continue}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ type PaymentMethodProps = {
isExistingBalanceDisabled?: boolean
showExistingBalance?: boolean
isCoinflowEnabled?: boolean
showVendorChoice?: boolean
}

export const PaymentMethod = ({
Expand All @@ -77,7 +78,8 @@ export const PaymentMethod = ({
balance,
isExistingBalanceDisabled,
showExistingBalance,
isCoinflowEnabled
isCoinflowEnabled,
showVendorChoice
}: PaymentMethodProps) => {
const styles = useStyles()
const neutral = useColor('neutral')
Expand Down Expand Up @@ -111,7 +113,7 @@ export const PaymentMethod = ({
),
icon: IconCreditCard,
content:
vendorOptions.length > 1 ? (
vendorOptions.length > 1 && showVendorChoice ? (
<CardSelectionButton
selectedVendor={purchaseVendor ?? vendorOptions[0]}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ const RenderForm = ({
isExistingBalanceDisabled={isExistingBalanceDisabled}
showExistingBalance={!!(balance && !balance.isZero())}
isCoinflowEnabled={showCoinflow}
showVendorChoice={false}
/>
)}
</View>
Expand Down
1 change: 1 addition & 0 deletions packages/web/src/components/add-funds/AddFunds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const AddFunds = ({
</Flex>
</Box>
<PaymentMethod
showVendorChoice
selectedVendor={selectedPurchaseVendor ?? null}
selectedMethod={selectedPurchaseMethod}
setSelectedMethod={setSelectedPurchaseMethod}
Expand Down
6 changes: 4 additions & 2 deletions packages/web/src/components/payment-method/PaymentMethod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type PaymentMethodProps = {
isExistingBalanceDisabled?: boolean
isCoinflowEnabled?: boolean
showExistingBalance?: boolean
showVendorChoice?: boolean
}

export const PaymentMethod = ({
Expand All @@ -49,7 +50,8 @@ export const PaymentMethod = ({
balance,
isExistingBalanceDisabled,
showExistingBalance,
isCoinflowEnabled
isCoinflowEnabled,
showVendorChoice
}: PaymentMethodProps) => {
const isMobile = useIsMobile()
const balanceCents = formatUSDCWeiToFloorCentsNumber(
Expand Down Expand Up @@ -93,7 +95,7 @@ export const PaymentMethod = ({
label: messages.withCard,
icon: IconCreditCard,
value:
vendorOptions.length > 1 ? (
vendorOptions.length > 1 && showVendorChoice ? (
isMobile ? (
<MobileFilterButton
onSelect={handleSelectVendor}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export const PurchaseContentFormFields = ({
isExistingBalanceDisabled={isExistingBalanceDisabled}
showExistingBalance={!!(balanceBN && !balanceBN.isZero())}
isCoinflowEnabled={showCoinflow}
showVendorChoice={false}
/>
)}
{isUnlocking ? null : <PayToUnlockInfo />}
Expand Down

0 comments on commit e1dd6e0

Please sign in to comment.