diff --git a/frontend/components/MainPage/sections/GasBalanceSection.tsx b/frontend/components/MainPage/sections/GasBalanceSection.tsx index b1c58d76..3428e026 100644 --- a/frontend/components/MainPage/sections/GasBalanceSection.tsx +++ b/frontend/components/MainPage/sections/GasBalanceSection.tsx @@ -58,7 +58,7 @@ const BalanceStatus = () => { if (!storeState?.isInitialFunded) return; if (isMasterSafeLowOnNativeGas && !isLowBalanceNotificationShown) { - showNotification('Trading balance is too low.'); + showNotification('Operating balance is too low.'); setIsLowBalanceNotificationShown(true); } @@ -141,12 +141,12 @@ export const GasBalanceSection = () => { padding="16px 24px" > - Trading balance  + Operating balance  {masterSafe && ( - Your agent uses this balance to fund trading activity on-chain. + Your agent uses this balance to fund on-chain activity.
{activityLink} diff --git a/frontend/config/agents.ts b/frontend/config/agents.ts index c99e7a51..547f081e 100644 --- a/frontend/config/agents.ts +++ b/frontend/config/agents.ts @@ -59,7 +59,7 @@ export const AGENT_CONFIG: { // serviceApi: OptimusService, // }, [AgentType.Memeooorr]: { - name: 'Memeooorr agent', + name: 'Agents.fun agent', evmHomeChainId: EvmChainId.Base, middlewareHomeChainId: MiddlewareChain.BASE, requiresAgentSafesOn: [EvmChainId.Base], @@ -86,7 +86,7 @@ export const AGENT_CONFIG: { }, requiresMasterSafesOn: [EvmChainId.Base], serviceApi: MemeooorBaseService, - displayName: 'Memeooorr agent', + displayName: 'Agents.fun agent', description: 'Autonomously post to Twitter, create and trade memecoins, and interact with other agents.', }, diff --git a/frontend/hooks/useBalanceContext.ts b/frontend/hooks/useBalanceContext.ts index 05a9b3a7..4b41996a 100644 --- a/frontend/hooks/useBalanceContext.ts +++ b/frontend/hooks/useBalanceContext.ts @@ -1,7 +1,9 @@ +import { isNil } from 'lodash'; import { useContext, useMemo } from 'react'; import { CHAIN_CONFIG } from '@/config/chains'; import { BalanceContext, WalletBalanceResult } from '@/context/BalanceProvider'; +import { WalletOwnerType, WalletType } from '@/enums/Wallet'; import { Optional } from '@/types/Util'; import { useService } from './useService'; @@ -146,14 +148,14 @@ export const useMasterBalances = () => { if (!masterSafeNative) return; if (!homeChainNativeToken?.symbol) return; - const agentNativeGasRequirement = - selectedAgentConfig.agentSafeFundingRequirements?.[ - selectedAgentConfig.evmHomeChainId - ]; + const nativeGasRequirement = + selectedAgentConfig.operatingThresholds[WalletOwnerType.Master][ + WalletType.Safe + ][homeChainNativeToken.symbol]; - if (!agentNativeGasRequirement) return; + if (isNil(nativeGasRequirement)) return; - return masterSafeNative.balance < agentNativeGasRequirement; + return masterSafeNative.balance < nativeGasRequirement; }, [masterSafeNative, homeChainNativeToken, selectedAgentConfig]); const masterEoaNative = useMemo(() => {