diff --git a/govtool/frontend/src/components/organisms/DashboardCards.tsx b/govtool/frontend/src/components/organisms/DashboardCards.tsx index bccf72fdb..869faf2a7 100644 --- a/govtool/frontend/src/components/organisms/DashboardCards.tsx +++ b/govtool/frontend/src/components/organisms/DashboardCards.tsx @@ -7,15 +7,12 @@ import { useGetAdaHolderCurrentDelegationQuery, useGetVoterInfo, } from "@hooks"; -import { PROTOCOL_PARAMS_KEY, getItemFromLocalStorage } from "@utils"; import { DelegateDashboardCard } from "./DashboardCards/DelegateDashboardCard"; import { DRepDashboardCard } from "./DashboardCards/DRepDashboardCard"; import { DirectVoterDashboardCard } from "./DashboardCards/DirectVoterDashboardCard"; import { ListGovActionsDashboardCards } from "./DashboardCards/ListGovActionsDashboardCard"; import { ProposeGovActionDashboardCard } from "./DashboardCards/ProposeGovActionDashboardCard"; -const protocolParams = getItemFromLocalStorage(PROTOCOL_PARAMS_KEY); - export const DashboardCards = () => { const { dRepID, dRepIDBech32, pendingTransaction, stakeKey } = useCardano(); const { screenWidth } = useScreenDimension(); @@ -86,8 +83,6 @@ export const DashboardCards = () => { diff --git a/govtool/frontend/src/components/organisms/DashboardCards/ProposeGovActionDashboardCard.tsx b/govtool/frontend/src/components/organisms/DashboardCards/ProposeGovActionDashboardCard.tsx index 721289684..344f4cafb 100644 --- a/govtool/frontend/src/components/organisms/DashboardCards/ProposeGovActionDashboardCard.tsx +++ b/govtool/frontend/src/components/organisms/DashboardCards/ProposeGovActionDashboardCard.tsx @@ -2,45 +2,29 @@ import { useNavigate } from "react-router-dom"; import { IMAGES, PATHS, PDF_PATHS } from "@consts"; import { PendingTransaction, useFeatureFlag } from "@context"; -import { useTranslation, useWalletErrorModal } from "@hooks"; +import { useTranslation } from "@hooks"; import { DashboardActionCard } from "@molecules"; -import { correctAdaFormat, openInNewTab } from "@utils"; +import { openInNewTab } from "@utils"; import { useCallback } from "react"; type ProposeGovActionDashboardCardProps = { createGovActionTx: PendingTransaction["createGovAction"]; - deposit: number; - votingPower: number; }; export const ProposeGovActionDashboardCard = ({ createGovActionTx, - deposit, - votingPower, }: ProposeGovActionDashboardCardProps) => { const { isProposalDiscussionForumEnabled } = useFeatureFlag(); const navigate = useNavigate(); const { t } = useTranslation(); - const openWalletErrorModal = useWalletErrorModal(); const onClickPropose = useCallback(() => { - if (votingPower <= deposit) { - openWalletErrorModal({ - error: t("errors.insufficientBalanceDescription", { - ada: correctAdaFormat(deposit), - }), - title: t("errors.insufficientBalanceTitle"), - dataTestId: "insufficient-balance-error-modal", - }); - return; - } - navigate( isProposalDiscussionForumEnabled ? PDF_PATHS.proposalDiscussionPropose : PATHS.createGovernanceAction, ); - }, [deposit, votingPower, isProposalDiscussionForumEnabled]); + }, [isProposalDiscussionForumEnabled]); return (