From bd226057c664e98d7e3cffc7735bcd71074d5835 Mon Sep 17 00:00:00 2001 From: David Totraev Date: Thu, 24 Oct 2024 19:29:38 +0500 Subject: [PATCH] feat(phase-2): update preview modal --- src/app/components/Modals/PreviewModal.tsx | 28 +++++++++------------- src/app/components/Staking/Staking.tsx | 1 - 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/app/components/Modals/PreviewModal.tsx b/src/app/components/Modals/PreviewModal.tsx index 6823452d..f8446150 100644 --- a/src/app/components/Modals/PreviewModal.tsx +++ b/src/app/components/Modals/PreviewModal.tsx @@ -1,4 +1,5 @@ import { IoMdClose } from "react-icons/io"; +import { twJoin } from "tailwind-merge"; import { getNetworkConfig } from "@/config/network.config"; import { blocksToDisplayTime } from "@/utils/blocksToDisplayTime"; @@ -18,7 +19,6 @@ interface PreviewModalProps { stakingTimeBlocks: number; stakingFeeSat: number; feeRate: number; - unbondingTimeBlocks: number; confirmationDepth: number; unbondingFeeSat: number; awaitingWalletResponse: boolean; @@ -30,7 +30,6 @@ export const PreviewModal: React.FC = ({ finalityProvider, stakingAmountSat, stakingTimeBlocks, - unbondingTimeBlocks, onSign, stakingFeeSat, feeRate, @@ -63,42 +62,37 @@ export const PreviewModal: React.FC = ({
-
+

Finality Provider

{finalityProvider || "-"}

-
+

Stake Amount

{`${maxDecimals(satoshiToBtc(stakingAmountSat), 8)} ${coinName}`}

-
+

Fee rate

{feeRate} sat/vB

-
+

Transaction fee

{`${maxDecimals(satoshiToBtc(stakingFeeSat), 8)} ${coinName}`}

-
+

Term

{blocksToDisplayTime(stakingTimeBlocks)}

-
-

- On-demand unbonding -

-

- Enabled ({blocksToDisplayTime(unbondingTimeBlocks)} unbonding - time) -

+
+

Slashing ratio

+

12.3%

-
+

Unbonding fee

{`${maxDecimals(satoshiToBtc(unbondingFeeSat), 8)} ${coinName}`}

@@ -139,7 +133,7 @@ export const PreviewModal: React.FC = ({ Cancel
)} diff --git a/src/app/components/Staking/Staking.tsx b/src/app/components/Staking/Staking.tsx index 3d546434..d3db7d79 100644 --- a/src/app/components/Staking/Staking.tsx +++ b/src/app/components/Staking/Staking.tsx @@ -622,7 +622,6 @@ export const Staking = () => { stakingFeeSat={stakingFeeSat} confirmationDepth={confirmationDepth} feeRate={feeRate} - unbondingTimeBlocks={unbondingTime} unbondingFeeSat={unbondingFeeSat} awaitingWalletResponse={awaitingWalletResponse} />