diff --git a/packages/mobile/src/components/payment-method/PaymentMethod.tsx b/packages/mobile/src/components/payment-method/PaymentMethod.tsx index 850099ca4f7..f5bab1d2280 100644 --- a/packages/mobile/src/components/payment-method/PaymentMethod.tsx +++ b/packages/mobile/src/components/payment-method/PaymentMethod.tsx @@ -7,7 +7,8 @@ import { formatCurrencyBalance, FeatureFlags, useFeatureFlag, - PurchaseVendor + PurchaseVendor, + removeNullable } from '@audius/common' import BN from 'bn.js' import { FlatList, View, TouchableOpacity } from 'react-native' @@ -87,6 +88,10 @@ export const PaymentMethod = ({ const purchaseVendor = useSelector(getPurchaseVendor) const { isEnabled: isCoinflowEnabled, isLoaded: isCoinflowEnabledLoaded } = useFeatureFlag(FeatureFlags.BUY_WITH_COINFLOW) + const vendorOptions = [ + isCoinflowEnabled ? PurchaseVendor.COINFLOW : null, + PurchaseVendor.STRIPE + ].filter(removeNullable) // Initial state is coinflow by default, but set to stripe if coinflow is disabled. useEffect(() => { @@ -105,7 +110,10 @@ export const PaymentMethod = ({ ), icon: IconCreditCard, - content: + content: + vendorOptions.length > 1 ? ( + + ) : null }, { id: PurchaseMethod.CRYPTO, diff --git a/packages/mobile/src/components/premium-track-purchase-drawer/PremiumTrackPurchaseDrawer.tsx b/packages/mobile/src/components/premium-track-purchase-drawer/PremiumTrackPurchaseDrawer.tsx index 4df4f2c3079..6d71bbbfb18 100644 --- a/packages/mobile/src/components/premium-track-purchase-drawer/PremiumTrackPurchaseDrawer.tsx +++ b/packages/mobile/src/components/premium-track-purchase-drawer/PremiumTrackPurchaseDrawer.tsx @@ -325,7 +325,7 @@ const RenderForm = ({ setSelectedMethod={setPurchaseMethod} balance={balance} isExistingBalanceDisabled={isExistingBalanceDisabled} - showExistingBalance={!balance?.isZero} + showExistingBalance={!balance?.isZero()} /> )}