@@ -11,6 +11,7 @@ import {
1111import { useMemo , useState } from "react" ;
1212import { AiOutlineInfoCircle } from "react-icons/ai" ;
1313import { PiWalletBold } from "react-icons/pi" ;
14+ import { useLocation } from "react-router" ;
1415import { Tooltip } from "react-tooltip" ;
1516import { twMerge } from "tailwind-merge" ;
1617
@@ -42,6 +43,10 @@ export const Connect: React.FC<ConnectProps> = ({
4243 setIsWalletMenuOpen ( open ) ;
4344 } ;
4445
46+ const location = useLocation ( ) ;
47+ const isBabyRoute = location . pathname . startsWith ( "/baby" ) ;
48+ const requireBothWallets = ! isBabyRoute ;
49+
4550 // App state and wallet context
4651 const { includeOrdinals, excludeOrdinals, ordinalsExcluded } = useAppState ( ) ;
4752 const { linkedDelegationsVisibility, displayLinkedDelegations } =
@@ -108,14 +113,26 @@ export const Connect: React.FC<ConnectProps> = ({
108113 apiMessage,
109114 isLoading : isHealthcheckLoading ,
110115 } = useHealthCheck ( ) ;
116+
111117 const isConnected = useMemo (
112118 ( ) =>
113- btcConnected && bbnConnected && ! isGeoBlocked && ! isHealthcheckLoading ,
114- [ btcConnected , bbnConnected , isGeoBlocked , isHealthcheckLoading ] ,
119+ ( requireBothWallets ? btcConnected && bbnConnected : bbnConnected ) &&
120+ ! isGeoBlocked &&
121+ ! isHealthcheckLoading ,
122+ [
123+ requireBothWallets ,
124+ btcConnected ,
125+ bbnConnected ,
126+ isGeoBlocked ,
127+ isHealthcheckLoading ,
128+ ] ,
115129 ) ;
116130
117131 const isLoading =
118- isConnected || ! isApiNormal || loading || btcLoading || bbnLoading ;
132+ isConnected ||
133+ ! isApiNormal ||
134+ loading ||
135+ ( requireBothWallets ? btcLoading || bbnLoading : bbnLoading ) ;
119136
120137 const transformedWallets = useMemo ( ( ) => {
121138 const result : Record < string , { name : string ; icon : string } > = { } ;
@@ -174,16 +191,18 @@ export const Connect: React.FC<ConnectProps> = ({
174191 trigger = {
175192 < div className = "cursor-pointer" >
176193 < AvatarGroup max = { 2 } variant = "circular" >
177- < Avatar
178- alt = { selectedWallets [ "BTC" ] ?. name }
179- url = { selectedWallets [ "BTC" ] ?. icon }
180- size = "large"
181- className = { twMerge (
182- "object-contain bg-accent-contrast box-content" ,
183- isWalletMenuOpen &&
184- "outline outline-[2px] outline-accent-primary" ,
185- ) }
186- />
194+ { selectedWallets [ "BTC" ] ? (
195+ < Avatar
196+ alt = { selectedWallets [ "BTC" ] ?. name }
197+ url = { selectedWallets [ "BTC" ] ?. icon }
198+ size = "large"
199+ className = { twMerge (
200+ "object-contain bg-accent-contrast box-content" ,
201+ isWalletMenuOpen &&
202+ "outline outline-[2px] outline-accent-primary" ,
203+ ) }
204+ />
205+ ) : null }
187206 < Avatar
188207 alt = { selectedWallets [ "BBN" ] ?. name }
189208 url = { selectedWallets [ "BBN" ] ?. icon }
0 commit comments