diff --git a/src/components/General/ValidatorsMenuWithPrice.stories.ts b/src/components/General/ValidatorsMenuWithPrice.stories.ts index 54953f15..8e6b9927 100644 --- a/src/components/General/ValidatorsMenuWithPrice.stories.ts +++ b/src/components/General/ValidatorsMenuWithPrice.stories.ts @@ -14,7 +14,6 @@ type Story = StoryObj export const Default: Story = { args: { validatorCount: 2, - addValidatorHandler: () => {}, changeValidatorCountHandler: () => {}, }, } @@ -22,7 +21,6 @@ export const Default: Story = { export const WithoutValidatorCount: Story = { args: { validatorCount: 0, - addValidatorHandler: () => {}, changeValidatorCountHandler: () => {}, }, } @@ -30,7 +28,6 @@ export const WithoutValidatorCount: Story = { export const WithLongValidatorCount: Story = { args: { validatorCount: 2000, - addValidatorHandler: () => {}, changeValidatorCountHandler: () => {}, }, } diff --git a/src/components/General/ValidatorsMenuWithPrice.tsx b/src/components/General/ValidatorsMenuWithPrice.tsx index 12c9cafe..c4e0f6b9 100644 --- a/src/components/General/ValidatorsMenuWithPrice.tsx +++ b/src/components/General/ValidatorsMenuWithPrice.tsx @@ -9,13 +9,11 @@ import CurrencyDropdown from './CurrencyDropdown' type ValidatorsMenuWithPriceProps = { validatorCount: number - addValidatorHandler: () => void changeValidatorCountHandler: (value: string) => void } const ValidatorsMenuWithPrice = ({ validatorCount, - addValidatorHandler, changeValidatorCountHandler, }: ValidatorsMenuWithPriceProps) => { const [currency, setCurrency] = useState(CURRENCIES[0]) @@ -31,7 +29,13 @@ const ValidatorsMenuWithPrice = ({ } + icon={ + changeValidatorCountHandler((validatorCount + 1).toString())} + /> + } style={{ fontWeight: 'bold' }} value={validatorCount.toString()} onChangeText={changeValidatorCountHandler} diff --git a/src/pages/ValidatorOnboarding/Deposit/Deposit.tsx b/src/pages/ValidatorOnboarding/Deposit/Deposit.tsx index 60d92c8a..83fe2cf4 100644 --- a/src/pages/ValidatorOnboarding/Deposit/Deposit.tsx +++ b/src/pages/ValidatorOnboarding/Deposit/Deposit.tsx @@ -18,10 +18,6 @@ const Deposit = () => { const { isWalletConnected } = useSelector((state: RootState) => state.deposit) const isTransactionConfirmation = false - const addValidatorHandler = () => { - setValidatorCount((state: number) => state + 1) - } - const changeValidatorCountHandler = (value: string) => { const numberValue = Number(value) if (!isNaN(numberValue)) { @@ -44,7 +40,6 @@ const Deposit = () => { ) : ( )}