diff --git a/app/(protected)/(tabs)/_layout.tsx b/app/(protected)/(tabs)/_layout.tsx index ccd5b8a12..1f9090b2d 100644 --- a/app/(protected)/(tabs)/_layout.tsx +++ b/app/(protected)/(tabs)/_layout.tsx @@ -10,16 +10,13 @@ import lightningAnimation from '@/assets/tabs-icons/lightning.json'; import { CustomTabBar } from '@/components/CustomTabBar'; import { HapticTab } from '@/components/HapticTab'; import { LottieTabIcon } from '@/components/LottieTabIcon'; -import { NewCustomTabBar } from '@/components/tabBar/NewCustomTabBar'; import RewardsTabIcon from '@/components/tabBar/RewardsTabIcon'; import TabBarBackground from '@/components/ui/TabBarBackground'; import { path } from '@/constants/path'; import { useDimension } from '@/hooks/useDimension'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; export default function TabLayout() { const { isDesktop } = useDimension(); - const isTestUser = useIsTestUser(); return ( (isTestUser ? : ) - : undefined - } + tabBar={!isDesktop ? props => : undefined} backBehavior="history" > , - // Only surface the Rewards tab (and its route) for whitelisted users; - // the whitelisted NewCustomTabBar renders Wallet/Savings/Rewards. - href: isTestUser ? path.REWARDS : null, + // Only surface the Rewards tab (and its route) on qa/preview builds; + // the redesigned NewCustomTabBar renders Wallet/Savings/Rewards. + href: null, }} /> - {isTestUser && ( - - )} state.active); @@ -240,46 +238,22 @@ export default function CardDetails() { shouldRevealDetails={shouldRevealDetails} onCardDetailsLoaded={handleCardDetailsLoaded} provider={provider} - useNewCard={isTestUser} last4={cardLast4} /> ); return ( - // Whitelisted screen renders immediately (never the full-screen loader): the + // The redesigned screen renders immediately (never the full-screen loader): the // card must be laid out right away so the hero transition can measure its // destination and land smoothly. Data fills in as it arrives (balance/last-4 // are usually already warm from the home screen's query). - - {/* Whitelisted screen drops the "Card" heading — the card image is the top - section; public/desktop keep the heading. */} - {!isTestUser && pageHeader} + + {/* The redesigned screen drops the "Card" heading — the card image is the top + section; production/desktop keep the heading. */} + {pageHeader} - - {!isTestUser && } - {isTestUser ? ( - // Card is the top section, full-bleed (cancel the container's px-4) to - // match the home card width. The Show details button peeks out from - // behind it (card sits above via z-10). - - {/* pointerEvents none: the card sits above the button (z-10) and - its bounds include the transparent bottom-shadow region that - overlaps the button — without this it would swallow the button's - taps. The card itself isn't interactive on this screen. */} - - {cardImageSection} - - - ) : ( - cardImageSection - )} + + @@ -541,7 +514,7 @@ interface CardImageSectionProps { shouldRevealDetails: boolean; onCardDetailsLoaded: () => void; provider?: CardProvider | null; - /** Whitelisted screen: render the new VISA Platinum artwork (with code-drawn + /** Redesigned screen: render the new VISA Platinum artwork (with code-drawn * glyph badge + white "reveal" overlay) instead of the legacy card image. */ useNewCard?: boolean; /** Last 4 digits for the glyph badge (new card only). */ @@ -841,7 +814,7 @@ interface CardActionsProps { onFreezeToggle: () => Promise; isWithdrawFromCardAllowed: boolean; isRain: boolean; - /** Hide the circular "Card details" action (whitelisted screen uses a full-row button instead). */ + /** Hide the circular "Card details" action (redesigned screen uses a full-row button instead). */ hideCardDetailsButton?: boolean; } @@ -1096,7 +1069,7 @@ const styles = StyleSheet.create({ opacity: 0.25, }, - // Whitelisted card: extend past the container's px-4 (16px) padding so the + // Redesigned card: extend past the container's px-4 (16px) padding so the // card is as wide as the home screen card. fullBleedCard: { marginHorizontal: -16 }, // The artwork's bottom ~6.5% is transparent drop-shadow. RN resolves % margins diff --git a/app/(protected)/(tabs)/index.native.tsx b/app/(protected)/(tabs)/index.native.tsx index d285acd80..a82176d18 100644 --- a/app/(protected)/(tabs)/index.native.tsx +++ b/app/(protected)/(tabs)/index.native.tsx @@ -8,7 +8,6 @@ import LazyHomeBanners from '@/components/Dashboard/LazyHomeBanners'; import HomeCashbackCard from '@/components/Home/HomeCashbackCard'; import HomeSavingsStatCard from '@/components/Home/HomeSavingsStatCard'; import HomeVirtualCard from '@/components/Home/HomeVirtualCard'; -import HomeScreenNew from '@/components/Home/NewHome/HomeScreenNew'; import PageLayout from '@/components/PageLayout'; import SpinWinCard from '@/components/SpinAndWin/SpinWinCard'; import Skeleton from '@/components/ui/skeleton'; @@ -21,7 +20,6 @@ import { useUserTransactions } from '@/hooks/useAnalytics'; import { useCardDetails } from '@/hooks/useCardDetails'; import { useCardStatus } from '@/hooks/useCardStatus'; import { useCurrentGiveaway, useGiveawayCountdown } from '@/hooks/useGiveaway'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import { MONITORED_COMPONENTS, useRenderMonitor } from '@/hooks/useRenderMonitor'; import { useSpinStatus } from '@/hooks/useSpinWin'; import { useTotalSavingsUSD } from '@/hooks/useTotalSavingsUSD'; @@ -40,8 +38,8 @@ import { useUserStore } from '@/store/useUserStore'; * Web keeps its own layout in `index.tsx`; this `.native.tsx` variant is used on * iOS/Android only (resolved by Metro). * - * Whitelisted internal users see the redesigned `HomeScreenNew`; everyone else - * keeps this `LegacyHome`. The gate lives in the default export below. + * qa/preview builds see the redesigned `HomeScreenNew`; production keeps this + * `LegacyHome`. The gate lives in the default export below. */ function LegacyHome() { useRenderMonitor({ componentName: MONITORED_COMPONENTS.HOME_SCREEN }); @@ -197,8 +195,7 @@ function LegacyHome() { } export default function Home() { - // Whitelisted internal team members see the redesigned wallet screen; all - // other users keep the existing design. Native is never desktop. - const showNewHome = useIsTestUser(); - return showNewHome ? : ; + // qa/preview builds see the redesigned wallet screen; production keeps the + // existing design. Native is never desktop. + return ; } diff --git a/app/(protected)/(tabs)/index.tsx b/app/(protected)/(tabs)/index.tsx index 9b6b61ef3..6a13c1829 100644 --- a/app/(protected)/(tabs)/index.tsx +++ b/app/(protected)/(tabs)/index.tsx @@ -24,7 +24,6 @@ import { useCardDetails } from '@/hooks/useCardDetails'; import { useCardStatus } from '@/hooks/useCardStatus'; import { useDimension } from '@/hooks/useDimension'; import { useCurrentGiveaway, useGiveawayCountdown } from '@/hooks/useGiveaway'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import { MONITORED_COMPONENTS, useRenderMonitor } from '@/hooks/useRenderMonitor'; import { useSpinStatus } from '@/hooks/useSpinWin'; import { useTotalSavingsUSD } from '@/hooks/useTotalSavingsUSD'; @@ -261,9 +260,5 @@ function LegacyHome() { } export default function Home() { - const { isDesktop } = useDimension(); - // Whitelisted internal team members on mobile-web see the redesigned wallet - // screen; desktop web and all other users keep the existing design. - const showNewHome = useIsTestUser() && !isDesktop; - return showNewHome ? : ; + return ; } diff --git a/app/(protected)/(tabs)/rewards/index.tsx b/app/(protected)/(tabs)/rewards/index.tsx index a2729596a..b68cc008f 100644 --- a/app/(protected)/(tabs)/rewards/index.tsx +++ b/app/(protected)/(tabs)/rewards/index.tsx @@ -18,7 +18,6 @@ import { path } from '@/constants/path'; import { TRACKING_EVENTS } from '@/constants/tracking-events'; import { useCardStatus } from '@/hooks/useCardStatus'; import { useDimension } from '@/hooks/useDimension'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import { useOptInToRewards, useRewardsUserData } from '@/hooks/useRewards'; import { track } from '@/lib/analytics'; import { hasCard } from '@/lib/utils'; @@ -26,11 +25,7 @@ import { useRewards } from '@/store/useRewardsStore'; import { useRewardsWelcomePopupStore } from '@/store/useRewardsWelcomePopupStore'; export default function Rewards() { - // Whitelisted internal team members see the redesigned rewards screen; all - // other users — and every desktop-web user — keep the existing design. - const { isDesktop } = useDimension(); - const showNew = useIsTestUser() && !isDesktop; - return showNew ? : ; + return ; } function LegacyRewards() { diff --git a/app/(protected)/(tabs)/savings.tsx b/app/(protected)/(tabs)/savings.tsx index 9eed8b306..7e1ab6fa9 100644 --- a/app/(protected)/(tabs)/savings.tsx +++ b/app/(protected)/(tabs)/savings.tsx @@ -30,7 +30,6 @@ import { } from '@/hooks/useAnalytics'; import { useDepositCalculations } from '@/hooks/useDepositCalculations'; import { useDimension } from '@/hooks/useDimension'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import { MONITORED_COMPONENTS, useRenderMonitor } from '@/hooks/useRenderMonitor'; import { useSavingsSummary } from '@/hooks/useSavingsSummary'; import useUser from '@/hooks/useUser'; @@ -44,11 +43,7 @@ import { useDepositStore } from '@/store/useDepositStore'; import { useSavingStore } from '@/store/useSavingStore'; export default function Savings() { - // Whitelisted internal team members see the redesigned savings screen; all - // other users — and every desktop-web user — keep the existing design. - const { isDesktop } = useDimension(); - const showNew = useIsTestUser() && !isDesktop; - return showNew ? : ; + return ; } function LegacySavings() { diff --git a/app/(protected)/(tabs)/settings/index.tsx b/app/(protected)/(tabs)/settings/index.tsx index 2c057e6fd..23d37f584 100644 --- a/app/(protected)/(tabs)/settings/index.tsx +++ b/app/(protected)/(tabs)/settings/index.tsx @@ -23,7 +23,6 @@ import { Text } from '@/components/ui/text'; import { path } from '@/constants/path'; import { getTierDisplayName, getTierIcon } from '@/constants/rewards'; import { useDimension } from '@/hooks/useDimension'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import useNotificationPermissionStatus from '@/hooks/useNotificationPermissionStatus'; import { useRewardsUserData } from '@/hooks/useRewards'; import useUser from '@/hooks/useUser'; @@ -116,8 +115,8 @@ const MobileSettings = () => { const currentTier = rewardsData?.currentTier ?? RewardsTier.CORE; const displayName = getUserDisplayName(user, 18); const [isReferralModalOpen, setIsReferralModalOpen] = useState(false); - // GoodDollar is internal-only: shown only to whitelisted test users. - const canSeeGoodDollar = useIsTestUser(); + // GoodDollar is in development: shown only on qa/preview builds, hidden in production. + const canSeeGoodDollar = false; const rowGroups: MobileSettingsRow[][] = [ [ diff --git a/app/(protected)/_layout.tsx b/app/(protected)/_layout.tsx index 42d58fff5..c1bfcd740 100644 --- a/app/(protected)/_layout.tsx +++ b/app/(protected)/_layout.tsx @@ -251,7 +251,7 @@ export default function ProtectedLayout() { }} /> - {/* Root-level hero overlay for the card view-transition (whitelisted new + {/* Root-level hero overlay for the card view-transition (redesigned screens only — stays dormant/null otherwise). Mounted above the whole navigator so the card can fly across the home → card/details change. */} diff --git a/components/AccountCenter/AccountCenterDropdown.web.tsx b/components/AccountCenter/AccountCenterDropdown.web.tsx index 7a6bdea3a..e61f254c9 100644 --- a/components/AccountCenter/AccountCenterDropdown.web.tsx +++ b/components/AccountCenter/AccountCenterDropdown.web.tsx @@ -7,7 +7,6 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import useUser from '@/hooks/useUser'; import { cn } from '@/lib/utils'; @@ -30,8 +29,8 @@ const cursorDefaultClassName = const AccountCenterDropdown = () => { const insets = useSafeAreaInsets(); const { handleLogout } = useUser(); - // GoodDollar is internal-only: shown only to whitelisted test users. - const canSeeGoodDollar = useIsTestUser(); + // GoodDollar is in development: shown only on qa/preview builds, hidden in production. + const canSeeGoodDollar = false; const contentInsets = { top: insets.top, diff --git a/components/Card/NewCardDetails/ShowDetailsButton.tsx b/components/Card/NewCardDetails/ShowDetailsButton.tsx index b45395622..3c4b0dbb8 100644 --- a/components/Card/NewCardDetails/ShowDetailsButton.tsx +++ b/components/Card/NewCardDetails/ShowDetailsButton.tsx @@ -21,7 +21,7 @@ interface ShowDetailsButtonProps { /** * "Show details" / "Hide details" button (lucide eye open/close), replacing the - * small circular "Card details" action for whitelisted users. In `peek` mode it + * small circular "Card details" action on the redesigned screen. In `peek` mode it * slides out from underneath the card image. */ const ShowDetailsButton = ({ diff --git a/components/DepositToVault/VaultSelectorDropdown.tsx b/components/DepositToVault/VaultSelectorDropdown.tsx index 9d7b6791d..f74344451 100644 --- a/components/DepositToVault/VaultSelectorDropdown.tsx +++ b/components/DepositToVault/VaultSelectorDropdown.tsx @@ -7,7 +7,6 @@ import { useShallow } from 'zustand/react/shallow'; import { Text } from '@/components/ui/text'; import { VAULTS } from '@/constants/vaults'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import useVaultDepositConfig from '@/hooks/useVaultDepositConfig'; import { getAsset } from '@/lib/assets'; import { Vault } from '@/lib/types'; @@ -31,7 +30,6 @@ const VaultSelectorDropdown = () => { setPrincipalToken: state.setPrincipalToken, })), ); - const isTestUser = useIsTestUser(); const [isOpen, setIsOpen] = useState(false); @@ -62,7 +60,7 @@ const VaultSelectorDropdown = () => { const handleSelect = (index: number) => { const vault = VAULTS[index]; - const isComingSoon = !!vault?.isComingSoon && !isTestUser; + const isComingSoon = !!vault?.isComingSoon; if (isComingSoon || !vault) return; selectVaultForDeposit(index); @@ -137,7 +135,7 @@ const VaultSelectorDropdown = () => { {VAULTS.map((vault, index) => { const isSelected = vault.name === selectedVault.name; - const isComingSoon = !!vault.isComingSoon && !isTestUser; + const isComingSoon = !!vault.isComingSoon; return ( { diff --git a/components/Navbar/NavbarMobile.tsx b/components/Navbar/NavbarMobile.tsx index 53d63e6cf..ec1676362 100644 --- a/components/Navbar/NavbarMobile.tsx +++ b/components/Navbar/NavbarMobile.tsx @@ -11,12 +11,9 @@ import { Image } from 'expo-image'; import AccountCenterDropdown from '@/components/AccountCenter/AccountCenterDropdown.native'; import { Text } from '@/components/ui/text'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import useUser from '@/hooks/useUser'; import { getAsset } from '@/lib/assets'; -import HeaderBellButton from './HeaderBellButton'; -import HeaderProfileButton from './HeaderProfileButton'; import RegisterButtons from './RegisterButtons'; import WhatsNewButton from './WhatsNewButton'; @@ -48,11 +45,10 @@ const NavbarMobile = ({ topInset = 0, }: NavbarMobileProps) => { const { user } = useUser(); - const isTestUser = useIsTestUser(); - // Whitelisted "glass" header: profile moves to the left, the bell (Activity) - // joins What's-new on the right, and the Solid logo is dropped. Public users - // keep the existing header untouched. - const showNewHeader = isTestUser && !!user; + // Redesigned "glass" header (qa/preview builds): profile moves to the left, the + // bell (Activity) joins What's-new on the right, and the Solid logo is dropped. + // Production keeps the existing header untouched. + const showNewHeader = !!user; const hasBlurTarget = !!blurTarget; const isGlassVisible = hasBlurTarget && !!showDivider; const isTitleVisible = !!title && !!showTitle; @@ -115,16 +111,12 @@ const NavbarMobile = ({ )} - {showNewHeader ? ( - - ) : ( - Solid logo - )} + Solid logo {!!title && ( - {showNewHeader ? : } + ) : ( diff --git a/components/Rewards/NewRewards/RewardsScreenNew.tsx b/components/Rewards/NewRewards/RewardsScreenNew.tsx index 9a1c5d0ee..a6f21e451 100644 --- a/components/Rewards/NewRewards/RewardsScreenNew.tsx +++ b/components/Rewards/NewRewards/RewardsScreenNew.tsx @@ -16,8 +16,8 @@ import PointsHeadline from './PointsHeadline'; import RewardsSummaryCard from './RewardsSummaryCard'; /** - * Redesigned rewards screen (Apple "glass" style), shown only to whitelisted - * internal users via the dispatcher in rewards/index.tsx. Public users and all + * Redesigned rewards screen (Apple "glass" style), shown only on qa/preview + * builds via the dispatcher in rewards/index.tsx. Production and all * desktop-web users keep the legacy rewards screen. * * Shows the user's CURRENT tier + points, a rewards summary (cashback + diff --git a/components/Savings/NewSavings/SavingsScreenNew.tsx b/components/Savings/NewSavings/SavingsScreenNew.tsx index 2a09ea873..dbee53791 100644 --- a/components/Savings/NewSavings/SavingsScreenNew.tsx +++ b/components/Savings/NewSavings/SavingsScreenNew.tsx @@ -21,8 +21,8 @@ import VaultSavingsSection from './VaultSavingsSection'; import type { ApyByType } from './savingsVaultData'; /** - * Redesigned savings screen (Apple "glass" style), shown only to whitelisted - * internal users via the dispatcher in savings.tsx. Public users and all + * Redesigned savings screen (Apple "glass" style), shown only on qa/preview + * builds via the dispatcher in savings.tsx. Production and all * desktop-web users keep the legacy savings screen. * * Two states share the "Savings Balance" headline + APY pill: diff --git a/components/Savings/SavingVault.tsx b/components/Savings/SavingVault.tsx index 1515d0113..463886cb6 100644 --- a/components/Savings/SavingVault.tsx +++ b/components/Savings/SavingVault.tsx @@ -16,7 +16,6 @@ import { useDimension } from '@/hooks/useDimension'; import { useVaultTotalValue } from '@/hooks/useVaultTotalValue'; import { getAsset } from '@/lib/assets'; import { Vault } from '@/lib/types'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import { compactNumberFormat } from '@/lib/utils'; import { useSavingStore } from '@/store/useSavingStore'; @@ -44,8 +43,7 @@ const SavingVault = ({ vault }: SavingVaultProps) => { const { isScreenMedium } = useDimension(); const vaultIndex = VAULTS.findIndex(v => v.name === vault.name); const isSelected = selectedVault === vaultIndex; - const isTestUser = useIsTestUser(); - const isComingSoon = !!vault.isComingSoon && !isTestUser; + const isComingSoon = !!vault.isComingSoon; const gapHeight = isScreenMedium ? 12 : 0; const iconSizeSelected = isScreenMedium ? 53 : 28; diff --git a/components/Savings/SavingVaultOld.tsx b/components/Savings/SavingVaultOld.tsx index 0d0d70f91..33e3e4adc 100644 --- a/components/Savings/SavingVaultOld.tsx +++ b/components/Savings/SavingVaultOld.tsx @@ -20,7 +20,6 @@ import { useDimension } from '@/hooks/useDimension'; import { useVaultTotalValueOld } from '@/hooks/useVaultTotalValueOld'; import { getAsset } from '@/lib/assets'; import { Vault } from '@/lib/types'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import { compactNumberFormat } from '@/lib/utils'; import { useSavingStore } from '@/store/useSavingStore'; @@ -48,8 +47,7 @@ const SavingVaultOld = ({ vault }: SavingVaultOldProps) => { const { isScreenMedium } = useDimension(); const vaultIndex = VAULTS.findIndex(v => v.name === vault.name); const isSelected = selectedVault === vaultIndex; - const isTestUser = useIsTestUser(); - const isComingSoon = !!vault.isComingSoon && !isTestUser; + const isComingSoon = !!vault.isComingSoon; const gapHeight = isScreenMedium ? 12 : 0; const iconSizeSelected = isScreenMedium ? 53 : 28; diff --git a/components/tabBar/NewCustomTabBar.tsx b/components/tabBar/NewCustomTabBar.tsx index 9724d69cf..d54dae1f7 100644 --- a/components/tabBar/NewCustomTabBar.tsx +++ b/components/tabBar/NewCustomTabBar.tsx @@ -94,7 +94,7 @@ function TabButton({ label, icon, isFocused, onPress, onLongPress, onLayout }: T } /** - * Whitelisted "glass" bottom tab bar. Identical navigation semantics to + * Redesigned "glass" bottom tab bar. Identical navigation semantics to * CustomTabBar (route filtering, originalIndex/isFocused mapping, tabPress → * CommonActions.navigate) plus a sliding oval glass indicator that animates * from the previously active tab to the tapped one. diff --git a/constants/tabs.ts b/constants/tabs.ts index 7f9008965..5ed681a11 100644 --- a/constants/tabs.ts +++ b/constants/tabs.ts @@ -4,24 +4,24 @@ * The bottom tab bar is driven by two gates: the `href` on each `Tabs.Screen` * in `app/(protected)/(tabs)/_layout.tsx`, and the visible-name lists below * (consumed by the tab bar components). Keeping the lists here gives both the - * public bar (`CustomTabBar`) and the whitelisted bar (`NewCustomTabBar`) a + * legacy bar (`CustomTabBar`) and the redesigned bar (`NewCustomTabBar`) a * single source of truth. */ -/** Tabs shown to public (non-whitelisted) users — current behavior. */ +/** Tabs shown on the legacy bar (production) — current behavior. */ export const PUBLIC_TAB_NAMES = ['index', 'savings', 'card', 'activity'] as const; /** - * Tabs shown to whitelisted internal users on the redesigned bar. + * Tabs shown on the redesigned bar (qa/preview builds). * Card is merged into the wallet page and Activity moves to a header bell, so * neither appears here (their routes remain registered/navigable). */ export const WHITELIST_TAB_NAMES = ['index', 'savings', 'rewards'] as const; /** - * Per-route label overrides for the whitelisted bar. Lets us render "Wallet" + * Per-route label overrides for the redesigned bar. Lets us render "Wallet" * for the `index` route without changing the route's title in `_layout.tsx` - * (which would leak into the public bar and desktop nav). + * (which would leak into the legacy bar and desktop nav). */ export const WHITELIST_TAB_LABELS: Record = { index: 'Wallet', diff --git a/hooks/useDepositBuyCryptoOptions.tsx b/hooks/useDepositBuyCryptoOptions.tsx index 15639dbf1..5bc157703 100644 --- a/hooks/useDepositBuyCryptoOptions.tsx +++ b/hooks/useDepositBuyCryptoOptions.tsx @@ -5,7 +5,6 @@ import { Image } from 'expo-image'; import { DEPOSIT_MODAL } from '@/constants/modals'; import { TRACKING_EVENTS } from '@/constants/tracking-events'; import { useCardStatus } from '@/hooks/useCardStatus'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; import { useOnrampAutomation } from '@/hooks/useOnrampAutomation'; import { track } from '@/lib/analytics'; import { getAsset } from '@/lib/assets'; @@ -15,7 +14,6 @@ import { useDepositStore } from '@/store/useDepositStore'; const useDepositBuyCryptoOptions = () => { const setModal = useDepositStore(state => state.setModal); const { data: cardStatus } = useCardStatus(); - const isTestUser = useIsTestUser(); const isRainApproved = cardStatus?.rainApplicationStatus === RainApplicationStatus.APPROVED; const { data: existingAutomation } = useOnrampAutomation(isRainApproved); @@ -56,8 +54,8 @@ const useDepositBuyCryptoOptions = () => { ); const filteredOptions = buyCryptoOptions - // Bank Deposit is gated behind the test-features allow list for now. - .filter(option => option.method !== 'bank_transfer' || isTestUser) + // Bank Deposit is in development: shown on qa/preview builds, hidden in production. + .filter(option => option.method !== 'bank_transfer') .filter(option => Platform.OS !== 'ios' || option.method !== 'credit_card'); return { buyCryptoOptions: filteredOptions }; diff --git a/hooks/useIsTestUser.ts b/hooks/useIsTestUser.ts deleted file mode 100644 index c0593d129..000000000 --- a/hooks/useIsTestUser.ts +++ /dev/null @@ -1,7 +0,0 @@ -import useUser from '@/hooks/useUser'; -import { isUserAllowedToUseTestFeature } from '@/lib/utils/testFeatures'; - -export const useIsTestUser = (): boolean => { - const { user } = useUser(); - return isUserAllowedToUseTestFeature(user?.username ?? ''); -}; diff --git a/hooks/useNav.ts b/hooks/useNav.ts index fd975962b..6992ca778 100644 --- a/hooks/useNav.ts +++ b/hooks/useNav.ts @@ -1,7 +1,6 @@ import { Href } from 'expo-router'; import { path } from '@/constants/path'; -import { useIsTestUser } from '@/hooks/useIsTestUser'; type MenuItem = { label: string; @@ -34,20 +33,12 @@ const stocks: MenuItem = { }; const useNav = () => { - const isTestUser = useIsTestUser(); const rewards: MenuItem = { label: 'Rewards', href: path.REWARDS, }; // Agent lives in the account-center menu, not the navbar. - const menuItems: MenuItem[] = [ - home, - savings, - card, - ...(isTestUser ? [stocks] : []), - rewards, - activity, - ]; + const menuItems: MenuItem[] = [home, savings, card, rewards, activity]; return { menuItems }; }; diff --git a/lib/config.ts b/lib/config.ts index c55791a1c..4a5b513e5 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -73,6 +73,8 @@ export const EXPO_PUBLIC_PERSONA_SANDBOX_ENVIRONMENT_ID = process.env.EXPO_PUBLIC_PERSONA_SANDBOX_ENVIRONMENT_ID ?? ''; export const EXPO_PUBLIC_COINGECKO_API_KEY = process.env.EXPO_PUBLIC_COINGECKO_API_KEY ?? ''; export const isProduction = EXPO_PUBLIC_ENVIRONMENT === 'production'; +// In-development features: visible on qa/preview builds, hidden in production. +export const isDevFeatureEnabled = !isProduction; type Addresses = { ethereum: { diff --git a/lib/utils/index.ts b/lib/utils/index.ts index 438ff3912..ed1a1de39 100644 --- a/lib/utils/index.ts +++ b/lib/utils/index.ts @@ -1,6 +1,4 @@ export * from './activity'; export * from './multicall'; export * from './swap'; -export * from './testFeatures'; export * from './utils'; - diff --git a/lib/utils/testFeatures.ts b/lib/utils/testFeatures.ts deleted file mode 100644 index 2232a5a0e..000000000 --- a/lib/utils/testFeatures.ts +++ /dev/null @@ -1,22 +0,0 @@ -export const TEST_FEATURES_ALLOW_LIST = [ - 'Mark1', - 'mayank18', - 'mayankmittal', - 'smargon4', - 'LukaFuse', - 'Test', - 'InternSolid22', - 'mul53', - 'vigor-homey.2z', - 'maxxb.34980', - 'cimal67977', - 'vesas62360', - 'smargonaq1', -]; - -export const isUserAllowedToUseTestFeature = (username: string) => { - return ( - TEST_FEATURES_ALLOW_LIST.includes(username.toLowerCase()) || - TEST_FEATURES_ALLOW_LIST.includes(username) - ); -};