Skip to content

Commit

Permalink
Merge pull request #327 from valory-xyz/fix/hardcoded-olas-running-no…
Browse files Browse the repository at this point in the history
…tification

fix: remove hardcoded OLAS requirement from "now running" notification
  • Loading branch information
truemiller authored Sep 6, 2024
2 parents eed4cae + 49ad26a commit 4336aad
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions frontend/components/MainPage/header/AgentButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useCallback, useMemo } from 'react';

import { Chain, DeploymentStatus } from '@/client';
import { COLOR } from '@/constants/colors';
import { StakingProgram } from '@/enums/StakingProgram';
import { useBalance } from '@/hooks/useBalance';
import { useElectronApi } from '@/hooks/useElectronApi';
import { useServices } from '@/hooks/useServices';
Expand Down Expand Up @@ -170,18 +169,7 @@ const AgentNotRunningButton = () => {

// Show success notification based on whether there was a service prior to starting
try {
if (!service) {
showNotification?.('Your agent is now running!');
} else {
const minimumStakedAmountRequired = getMinimumStakedAmountRequired(
serviceTemplate,
StakingProgram.Beta, // users should always deploy on Beta if they are yet to start their agent
);

showNotification?.(
`Your agent is running and you've staked ${minimumStakedAmountRequired} OLAS!`,
);
}
showNotification?.(`Your agent is running!`);
} catch (error) {
console.error(error);
showNotification?.('Error while showing "running" notification');
Expand All @@ -202,7 +190,6 @@ const AgentNotRunningButton = () => {
activeStakingProgram,
defaultStakingProgram,
serviceTemplate,
service,
]);

const isDeployable = useMemo(() => {
Expand Down

0 comments on commit 4336aad

Please sign in to comment.