diff --git a/packages/app/components/creator-token/buy-creator-token.tsx b/packages/app/components/creator-token/buy-creator-token.tsx index 02d725ab4..5607688c9 100644 --- a/packages/app/components/creator-token/buy-creator-token.tsx +++ b/packages/app/components/creator-token/buy-creator-token.tsx @@ -46,23 +46,23 @@ type Query = { const { useParam } = createParam(); // Disable ETH payment on dev for now because it doesn't support the dev environment yet. -const PAYMENT_METHODS = __DEV__ - ? [ - { - title: "USDC", - value: "USDC", - }, - ] - : [ - { - title: "ETH", - value: "ETH", - }, - { - title: "USDC", - value: "USDC", - }, - ]; +const BUY_PAYMENTS = [ + { + title: "ETH", + value: "ETH", + }, + { + title: "USDC", + value: "USDC", + }, +]; +const SELL_PAYMENTS = [ + { + title: "USDC", + value: "USDC", + }, +]; + const SELECT_LIST = [ { title: "Buy", @@ -168,6 +168,7 @@ export const BuyCreatorToken = () => { "https://app.uniswap.org/swap?outputCurrency=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base" ) } + size="regular" > Buy USDC on Uniswap @@ -180,6 +181,7 @@ export const BuyCreatorToken = () => { return ( @@ -262,15 +264,21 @@ export const BuyCreatorToken = () => { - m.value === "USDC") - } - value={paymentMethod} - onChange={(value: any) => setPaymentMethod(value)} - /> + {selectedAction === "buy" ? ( + setPaymentMethod(value)} + key="BUY_PAYMENTS" + /> + ) : ( + setPaymentMethod(value)} + key="SELL_PAYMENTS" + /> + )} { setShowExplanation(true); diff --git a/packages/app/components/creator-token/self-serve-explainer.tsx b/packages/app/components/creator-token/self-serve-explainer.tsx index 82a863611..e34763d2e 100644 --- a/packages/app/components/creator-token/self-serve-explainer.tsx +++ b/packages/app/components/creator-token/self-serve-explainer.tsx @@ -36,7 +36,9 @@ export const SelfServeExplainer = () => { const isDark = useIsDarkMode(); const { user } = useUser(); const { top } = useSafeAreaInsets(); - const userProfilePic = user?.data.profile.img_url; + const userProfilePic = + user?.data.profile.img_url || + "https://media.showtime.xyz/assets/default-creator-token-pic.png"; const [profilePic, setProfilePic] = useState( userProfilePic diff --git a/packages/app/hooks/use-wallet-balance.ts b/packages/app/hooks/use-wallet-balance.ts index f41ac31b2..c51445a24 100644 --- a/packages/app/hooks/use-wallet-balance.ts +++ b/packages/app/hooks/use-wallet-balance.ts @@ -7,6 +7,7 @@ import { useWallet } from "./use-wallet/use-wallet"; export const useWalletETHBalance = () => { const wallet = useWallet(); const res = useSWR("ethBalance" + wallet.address, async () => { + if (__DEV__) return { balance: 0, displayBalance: "0" }; if (wallet.address) { const res = (await publicClient.getBalance({ address: wallet.address, diff --git a/packages/design-system/toggle/index.tsx b/packages/design-system/toggle/index.tsx index 582a5e9ca..9d892d2b2 100644 --- a/packages/design-system/toggle/index.tsx +++ b/packages/design-system/toggle/index.tsx @@ -4,6 +4,8 @@ import Animated, { useAnimatedStyle, withTiming, useSharedValue, + FadeIn, + Layout, } from "react-native-reanimated"; import { useIsDarkMode } from "@showtime-xyz/universal.hooks"; @@ -71,6 +73,7 @@ export const Toggle = ({ backgroundColor: isDark ? colors.white : colors.gray[900], }, ]} + entering={FadeIn} /> ) : null} {options.map((item, index) => (