diff --git a/frontend/components/MainPage/sections/AlertSections/LowFunds/EmptyFunds.tsx b/frontend/components/MainPage/sections/AlertSections/LowFunds/EmptyFunds.tsx
index 9f8fb4d6..a98695ec 100644
--- a/frontend/components/MainPage/sections/AlertSections/LowFunds/EmptyFunds.tsx
+++ b/frontend/components/MainPage/sections/AlertSections/LowFunds/EmptyFunds.tsx
@@ -43,7 +43,7 @@ export const EmptyFunds = () => {
)}
-
+
}
type="primary"
diff --git a/frontend/components/MainPage/sections/AlertSections/LowFunds/FundsToActivate.tsx b/frontend/components/MainPage/sections/AlertSections/LowFunds/FundsToActivate.tsx
index 4568cfbd..fd7db6a6 100644
--- a/frontend/components/MainPage/sections/AlertSections/LowFunds/FundsToActivate.tsx
+++ b/frontend/components/MainPage/sections/AlertSections/LowFunds/FundsToActivate.tsx
@@ -3,6 +3,7 @@ import { useMemo } from 'react';
import { getNativeTokenSymbol } from '@/config/tokens';
import { UNICODE_SYMBOLS } from '@/constants/symbols';
+import { AgentType } from '@/enums/Agent';
import { TokenSymbol } from '@/enums/Token';
import { useNeedsFunds } from '@/hooks/useNeedsFunds';
import { useServices } from '@/hooks/useServices';
@@ -15,18 +16,23 @@ const { Text } = Typography;
type FundsToActivateProps = {
stakingFundsRequired: boolean;
- tradingFundsRequired: boolean;
+ otherFundsRequired: boolean;
+};
+
+const FUNDS_REQUIRED_FOR_BY_AGENT_TYPE = {
+ [AgentType.PredictTrader]: 'for trading',
+ [AgentType.Memeooorr]: 'for agent operations',
};
export const FundsToActivate = ({
stakingFundsRequired = true,
- tradingFundsRequired = true,
+ otherFundsRequired = true,
}: FundsToActivateProps) => {
const { selectedStakingProgramId } = useStakingProgram();
const { serviceFundRequirements } = useNeedsFunds(selectedStakingProgramId);
- const { selectedAgentConfig } = useServices();
+ const { selectedAgentConfig, selectedAgentType } = useServices();
const { evmHomeChainId: homeChainId } = selectedAgentConfig;
const nativeTokenSymbol = getNativeTokenSymbol(homeChainId);
const { chainName, masterSafeAddress } = useLowFundsDetails();
@@ -57,10 +63,10 @@ export const FundsToActivate = ({
staking.
)}
- {tradingFundsRequired && (
+ {otherFundsRequired && (
{UNICODE_SYMBOLS.BULLET} {nativeTokenRequired} -
- for trading.
+ {` ${FUNDS_REQUIRED_FOR_BY_AGENT_TYPE[selectedAgentType]}.`}
)}
diff --git a/frontend/components/MainPage/sections/AlertSections/LowFunds/MainNeedsFunds.tsx b/frontend/components/MainPage/sections/AlertSections/LowFunds/MainNeedsFunds.tsx
index cadacc9e..60a7169e 100644
--- a/frontend/components/MainPage/sections/AlertSections/LowFunds/MainNeedsFunds.tsx
+++ b/frontend/components/MainPage/sections/AlertSections/LowFunds/MainNeedsFunds.tsx
@@ -54,7 +54,7 @@ export const MainNeedsFunds = () => {
}
diff --git a/frontend/components/MainPage/sections/AlertSections/index.tsx b/frontend/components/MainPage/sections/AlertSections/index.tsx
index 4799f03b..d9ed1af8 100644
--- a/frontend/components/MainPage/sections/AlertSections/index.tsx
+++ b/frontend/components/MainPage/sections/AlertSections/index.tsx
@@ -1,5 +1,4 @@
import { CardSection } from '@/components/styled/CardSection';
-import { useFeatureFlag } from '@/hooks/useFeatureFlag';
import { AddBackupWalletAlert } from './AddBackupWalletAlert';
import { AvoidSuspensionAlert } from './AvoidSuspensionAlert';
@@ -9,15 +8,13 @@ import { NoAvailableSlotsOnTheContract } from './NoAvailableSlotsOnTheContract';
import { UpdateAvailableAlert } from './UpdateAvailableAlert';
export const AlertSections = () => {
- const isLowFundsEnabled = useFeatureFlag('low-funds');
-
return (
- {isLowFundsEnabled && }
+
);
diff --git a/frontend/components/SettingsPage/DebugInfoSection.tsx b/frontend/components/SettingsPage/DebugInfoSection.tsx
index 8010d9f6..7d2c9ce8 100644
--- a/frontend/components/SettingsPage/DebugInfoSection.tsx
+++ b/frontend/components/SettingsPage/DebugInfoSection.tsx
@@ -153,7 +153,8 @@ const DebugItem = ({
export const DebugInfoSection = () => {
const { masterEoa, masterSafes } = useMasterWalletContext();
- const { serviceWallets: serviceAddresses } = useServices();
+ const { serviceWallets: serviceAddresses, selectedAgentConfig } =
+ useServices();
const { walletBalances } = useBalanceContext();
const { masterEoaBalances, masterSafeBalances } = useMasterBalances();
@@ -184,13 +185,15 @@ export const DebugInfoSection = () => {
});
}
- if (!isNil(masterSafeBalances)) {
- masterSafes.forEach((wallet) => {
- result.push({
- title: 'Master Safe',
- ...getBalanceData(masterSafeBalances),
- address: wallet.address,
- });
+ const masterSafe = masterSafes.find(
+ (item) => item.evmChainId === selectedAgentConfig.evmHomeChainId,
+ );
+
+ if (!isNil(masterSafeBalances) && !isNil(masterSafe)) {
+ result.push({
+ title: 'Master Safe',
+ ...getBalanceData(masterSafeBalances),
+ address: masterSafe.address,
});
}
@@ -232,6 +235,7 @@ export const DebugInfoSection = () => {
masterEoaBalances,
masterSafeBalances,
masterSafes,
+ selectedAgentConfig.evmHomeChainId,
serviceAddresses,
walletBalances,
]);
diff --git a/frontend/context/RewardProvider.tsx b/frontend/context/RewardProvider.tsx
index 9fcb63e6..360560a4 100644
--- a/frontend/context/RewardProvider.tsx
+++ b/frontend/context/RewardProvider.tsx
@@ -62,7 +62,7 @@ const useStakingRewardsDetails = () => {
token!,
),
queryFn: async () => {
- if (!multisig || !token || !selectedStakingProgramId) return;
+ if (!multisig || !token || !selectedStakingProgramId) return null;
const response =
await selectedAgentConfig.serviceApi.getAgentStakingRewardsInfo({
agentMultisigAddress: multisig,
@@ -71,7 +71,7 @@ const useStakingRewardsDetails = () => {
chainId: currentChainId,
});
- if (!response) return;
+ if (!response) return null;
try {
const parsed = StakingRewardsInfoSchema.parse(response);