Skip to content

Commit

Permalink
(operate) feat: update availableOn for contribute contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanya-atatakai committed Nov 12, 2024
1 parent 91ec7be commit 4541ad0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 9 additions & 0 deletions apps/operate/components/Contracts/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ const STAKING_CONTRACT_DETAILS: Record<Address, StakingContractDetailsInfo> = {
minOperatingBalance: 135,
minOperatingBalanceToken: 'xDAI',
},
'0x00000000000000000000000095146adf659f455f300d7521b3b62a3b6c4aba1f': {
availableOn: 'contribute',
},
'0x0000000000000000000000002c8a5ac7b431ce04a037747519ba475884bce2fb': {
availableOn: 'contribute',
},
'0x000000000000000000000000708e511d5fcb3bd5a5d42f42aa9a69ec5b0ee2e8': {
availableOn: 'contribute',
},
};

const getApy = (
Expand Down
6 changes: 6 additions & 0 deletions apps/operate/components/RunAgentButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button, Flex } from 'antd';
import { BaseButtonProps } from 'antd/es/button/button';
import { NotificationOutlined } from '@ant-design/icons';
import Image from 'next/image';
import { StakingContract } from 'types';

Expand Down Expand Up @@ -27,6 +28,11 @@ const props = {
text: 'Quickstart',
href: 'https://github.com/valory-xyz/optimus-quickstart',
},
contribute: {
icon: <NotificationOutlined width={18} height={18} />,
text: 'Contribute',
href: 'https://contribute.olas.network/staking',
},
};
export const RunAgentButton = ({ availableOn, type = 'text', className }: RunAgentButtonProps) => {
if (availableOn === null)
Expand Down
2 changes: 1 addition & 1 deletion apps/operate/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type StakingContract = {
maxSlots: number;
apy: number;
stakeRequired: string;
availableOn: 'pearl' | 'quickstart' | 'optimusQuickstart' | null;
availableOn: 'pearl' | 'quickstart' | 'optimusQuickstart' | 'contribute' | null;
minOperatingBalance: number | null;
minOperatingBalanceToken: string | null;
minOperatingBalanceHint?: string;
Expand Down

0 comments on commit 4541ad0

Please sign in to comment.