From e8bdeafa0c530da8fba74d0855397dcda24a70a3 Mon Sep 17 00:00:00 2001 From: Steven Yi Date: Tue, 25 Jun 2024 19:40:56 -0400 Subject: [PATCH] fix: updated min delegated stake and operator stake to match contract --- src/components/modals/StakingModal.tsx | 2 +- src/components/modals/StartGatewayModal.tsx | 10 +++++----- src/pages/Gateway/index.tsx | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/modals/StakingModal.tsx b/src/components/modals/StakingModal.tsx index 580f8fc..1853586 100644 --- a/src/components/modals/StakingModal.tsx +++ b/src/components/modals/StakingModal.tsx @@ -116,7 +116,7 @@ const StakingModal = ({ .valueOf(); const minDelegatedStake = gateway ? new mIOToken(gateway?.settings.minDelegatedStake).toIO().valueOf() - : 100; + : 500; const minRequiredStakeToAdd = existingStake > 0 ? 1 : minDelegatedStake; const validators = { diff --git a/src/components/modals/StartGatewayModal.tsx b/src/components/modals/StartGatewayModal.tsx index 69308a3..8b05e0e 100644 --- a/src/components/modals/StartGatewayModal.tsx +++ b/src/components/modals/StartGatewayModal.tsx @@ -34,7 +34,7 @@ const DEFAULT_FORM_STATE = { const DEFAULT_PROTOCOL = 'https' as const; const DEFAULT_PORT = 443; const DEFAULT_DELEGATED_STAKING_REWARD_SHARE_RATIO = 0; -const DEFAULT_DELEGATED_STAKING = 100; +const DEFAULT_DELEGATED_STAKING = 500; const StartGatewayModal = ({ onClose }: { onClose: () => void }) => { const queryClient = useQueryClient(); @@ -90,8 +90,8 @@ const StartGatewayModal = ({ onClose }: { onClose: () => void }) => { { formPropertyName: 'stake', label: `*Stake (${IO_LABEL}):`, - placeholder: `Minimum 10000 ${IO_LABEL}`, - validateProperty: validateIOAmount('Stake', 10000), + placeholder: `Minimum 50000 ${IO_LABEL}`, + validateProperty: validateIOAmount('Stake', 50000), }, { formPropertyName: 'allowDelegatedStaking', @@ -102,9 +102,9 @@ const StartGatewayModal = ({ onClose }: { onClose: () => void }) => { label: `Minimum Delegated Stake (${IO_LABEL}):`, enabled: allowDelegatedStaking, placeholder: allowDelegatedStaking - ? `Minimum 100 ${IO_LABEL}` + ? `Minimum 500 ${IO_LABEL}` : 'Enable Delegated Staking to set this value.', - validateProperty: validateIOAmount('Minimum Delegated Stake', 100), + validateProperty: validateIOAmount('Minimum Delegated Stake', 500), }, { formPropertyName: 'delegatedStakingShareRatio', diff --git a/src/pages/Gateway/index.tsx b/src/pages/Gateway/index.tsx index 376b776..7be3368 100644 --- a/src/pages/Gateway/index.tsx +++ b/src/pages/Gateway/index.tsx @@ -189,8 +189,8 @@ const Gateway = () => { formPropertyName: 'stake', label: `Gateway Stake (${IO_LABEL}):`, rowType: RowType.BOTTOM, - placeholder: `Minimum 10000 ${IO_LABEL}`, - validateProperty: validateIOAmount('Stake', 10000, maxStake), + placeholder: `Minimum 50000 ${IO_LABEL}`, + validateProperty: validateIOAmount('Stake', 50000, maxStake), }, { formPropertyName: 'status', @@ -236,9 +236,9 @@ const Gateway = () => { rowType: RowType.LAST, enabled: delegatedStakingEnabled, placeholder: delegatedStakingEnabled - ? `Minimum 100 ${IO_LABEL}` + ? `Minimum 500 ${IO_LABEL}` : 'Enable Delegated Staking to set this value.', - validateProperty: validateIOAmount('Minumum Delegated Stake ', 100), + validateProperty: validateIOAmount('Minumum Delegated Stake ', 500), }, ];