diff --git a/frontend/components/MainPage/index.tsx b/frontend/components/MainPage/index.tsx index dd30035cb..dcd2c5b03 100644 --- a/frontend/components/MainPage/index.tsx +++ b/frontend/components/MainPage/index.tsx @@ -16,7 +16,6 @@ import { AddFundsSection } from './sections/AddFundsSection'; import { AlertSections } from './sections/AlertSections'; import { GasBalanceSection } from './sections/GasBalanceSection'; import { KeepAgentRunningSection } from './sections/KeepAgentRunningSection'; -import { MainNeedsFunds } from './sections/NeedsFundsSection'; import { MainOlasBalance } from './sections/OlasBalanceSection'; import { RewardsSection } from './sections/RewardsSection'; import { StakingContractSection } from './sections/StakingContractUpdate'; @@ -78,7 +77,6 @@ export const Main = () => { {isStakingContractSectionEnabled && } - diff --git a/frontend/components/MainPage/sections/AddFundsSection.tsx b/frontend/components/MainPage/sections/AddFundsSection.tsx index 9a689cd84..0d915a401 100644 --- a/frontend/components/MainPage/sections/AddFundsSection.tsx +++ b/frontend/components/MainPage/sections/AddFundsSection.tsx @@ -1,16 +1,5 @@ -import { - CopyOutlined, - // QrcodeOutlined, -} from '@ant-design/icons'; -import { - Button, - Flex, - message, - Popover, - // QRCode, - Tooltip, - Typography, -} from 'antd'; +import { CopyOutlined } from '@ant-design/icons'; +import { Button, Flex, message, Popover, Tooltip, Typography } from 'antd'; import Link from 'next/link'; import { forwardRef, useCallback, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; @@ -35,20 +24,6 @@ const CustomizedCardSection = styled(CardSection)<{ border?: boolean }>` } `; -const AddFundsGetTokensSection = () => { - const { selectedAgentConfig } = useServices(); - const { evmHomeChainId: homeChainId } = selectedAgentConfig; - - return ( - - - Get OLAS + {CHAIN_CONFIG[homeChainId].nativeToken.symbol} on{' '} - {CHAIN_CONFIG[homeChainId].name} {UNICODE_SYMBOLS.EXTERNAL_LINK} - - - ); -}; - export const AddFundsSection = () => { const fundSectionRef = useRef(null); const [isAddFundsVisible, setIsAddFundsVisible] = useState(false); @@ -88,47 +63,6 @@ export const AddFundsSection = () => { ); }; -/** - * Add funds section - */ -export const OpenAddFundsSection = forwardRef((_, ref) => { - const { selectedAgentConfig } = useServices(); - const { evmHomeChainId: homeChainId } = selectedAgentConfig; - const { masterSafes } = useMasterWalletContext(); - const masterSafeAddress = useMemo( - () => - masterSafes?.find((wallet) => wallet.evmChainId === homeChainId)?.address, - [homeChainId, masterSafes], - ); - - const truncatedFundingAddress: string | undefined = useMemo( - () => masterSafeAddress && truncateAddress(masterSafeAddress, 4), - [masterSafeAddress], - ); - - const handleCopyAddress = useCallback( - () => - masterSafeAddress && - copyToClipboard(masterSafeAddress).then(() => - message.success('Copied successfully!'), - ), - [masterSafeAddress], - ); - - return ( - - - - - - ); -}); -OpenAddFundsSection.displayName = 'OpenAddFundsSection'; - const AddFundsWarningAlertSection = () => { const { selectedAgentConfig } = useServices(); const { evmHomeChainId: homeChainId } = selectedAgentConfig; @@ -166,7 +100,7 @@ const AddFundsAddressSection = ({ - {fundingAddress ?? 'Error loading address'} + {fundingAddress ?? 'Unable to load address'} } > @@ -174,17 +108,60 @@ const AddFundsAddressSection = ({