diff --git a/frontend/components/MainPage/sections/GasBalanceSection.tsx b/frontend/components/MainPage/sections/GasBalanceSection.tsx index a523c6b9..40307141 100644 --- a/frontend/components/MainPage/sections/GasBalanceSection.tsx +++ b/frontend/components/MainPage/sections/GasBalanceSection.tsx @@ -105,7 +105,7 @@ const TooltipContent = styled.div` `; export const GasBalanceSection = () => { - const { selectedAgentConfig } = useServices(); + const { selectedAgentConfig, selectedService } = useServices(); const { evmHomeChainId: homeChainId } = selectedAgentConfig; const { masterSafes } = useMasterWalletContext(); const { isLoaded: isBalancesLoaded } = useBalanceContext(); @@ -116,6 +116,23 @@ export const GasBalanceSection = () => { return masterSafes.find((wallet) => wallet.evmChainId === homeChainId); }, [homeChainId, masterSafes]); + const activityLink = useMemo(() => { + if (!masterSafe) return; + if (!selectedService?.home_chain) return; + + const link = + EXPLORER_URL_BY_MIDDLEWARE_CHAIN[selectedService.home_chain] + + '/address/' + + masterSafe.address; + + return ( + + Track activity on blockchain explorer{' '} + + + ); + }, [masterSafe, selectedService?.home_chain]); + return ( { Your agent uses this balance to fund trading activity on-chain.
- - Track activity on blockchain explorer{' '} - - + {activityLink}
} >