From fcdf8d2bed235bc3ea9bd8faadd420de3798cff0 Mon Sep 17 00:00:00 2001 From: ioay Date: Tue, 23 Jan 2024 11:08:49 +0100 Subject: [PATCH] Reverted staking steps --- dapp/src/components/Modals/Staking/index.tsx | 14 +++++--------- .../Modals/Staking/utils/stakingSteps.ts | 6 ------ 2 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 dapp/src/components/Modals/Staking/utils/stakingSteps.ts diff --git a/dapp/src/components/Modals/Staking/index.tsx b/dapp/src/components/Modals/Staking/index.tsx index 607dd1f76..966a0c16b 100644 --- a/dapp/src/components/Modals/Staking/index.tsx +++ b/dapp/src/components/Modals/Staking/index.tsx @@ -5,25 +5,21 @@ import Overview from "./Overview" import ActionForm from "../ActionForm" import SignMessage from "./SignMessage" import DepositBTC from "./DepositBTC" -import { STAKING_STEPS } from "./utils/stakingSteps" function ActiveStakingStep() { - const { activeStep, startTransactionProcess, endTransactionProcess } = - useModalFlowContext() - const { ACTION_FORM, OVERVIEW, SIGN_MESSAGE, DEPOSIT_BTC } = STAKING_STEPS + const { activeStep, startTransactionProcess } = useModalFlowContext() switch (activeStep) { - case ACTION_FORM: + case 1: return - case OVERVIEW: + case 2: return - case SIGN_MESSAGE: + case 3: startTransactionProcess() return - case DEPOSIT_BTC: + case 4: return default: - endTransactionProcess() return null } } diff --git a/dapp/src/components/Modals/Staking/utils/stakingSteps.ts b/dapp/src/components/Modals/Staking/utils/stakingSteps.ts deleted file mode 100644 index db7493f6a..000000000 --- a/dapp/src/components/Modals/Staking/utils/stakingSteps.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const STAKING_STEPS = { - ACTION_FORM: 1, - OVERVIEW: 2, - SIGN_MESSAGE: 3, - DEPOSIT_BTC: 4, -}