diff --git a/pages/Home.tsx b/pages/Home.tsx index cb7a7ab..dee7ebb 100644 --- a/pages/Home.tsx +++ b/pages/Home.tsx @@ -1,6 +1,6 @@ import dayjs from "dayjs"; import relativeTime from "dayjs/plugin/relativeTime"; -import { Link, useFocusEffect } from "expo-router"; +import { Link, router, useFocusEffect } from "expo-router"; import { useBalance } from "hooks/useBalance"; import React, { useState } from "react"; import { @@ -24,6 +24,8 @@ import Screen from "~/components/Screen"; import { Button } from "~/components/ui/button"; import { Skeleton } from "~/components/ui/skeleton"; import { useGetFiatAmount } from "~/hooks/useGetFiatAmount"; +import { DEFAULT_WALLET_NAME } from "~/lib/constants"; +import { useAppStore } from "~/lib/state/appStore"; dayjs.extend(relativeTime); @@ -40,6 +42,8 @@ export function Home() { const [balanceState, setBalanceState] = useState( BalanceState.SATS, ); + const wallets = useAppStore((store) => store.wallets); + const selectedWalletId = useAppStore((store) => store.selectedWalletId); useFocusEffect(() => { reloadBalance(); @@ -90,6 +94,21 @@ export function Home() { onPress={switchBalanceState} className="w-full flex flex-col items-center justify-center gap-4" > + {wallets.length && ( + { + router.push("/settings/wallets"); + }} + > + + {wallets[selectedWalletId].name || DEFAULT_WALLET_NAME} + + + )} {balance && !refreshingBalance ? ( <>