diff --git a/apps/namadillo/src/App/Common/TransactionFees.tsx b/apps/namadillo/src/App/Common/TransactionFees.tsx index 6369d27bf..56b461c92 100644 --- a/apps/namadillo/src/App/Common/TransactionFees.tsx +++ b/apps/namadillo/src/App/Common/TransactionFees.tsx @@ -1,27 +1,33 @@ import clsx from "clsx"; -import { useGasEstimate } from "hooks/useGasEstimate"; +import { useAtomValue } from "jotai"; +import { TxKind, gasLimitsAtom, minimumGasPriceAtom } from "slices/fees"; import { NamCurrency } from "./NamCurrency"; import { TextLink } from "./TextLink"; + type TransactionFeesProps = { + txKind: TxKind; numberOfTransactions: number; className?: string; }; export const TransactionFees = ({ + txKind, numberOfTransactions, className, }: TransactionFeesProps): JSX.Element => { - const { calculateMinGasRequired } = useGasEstimate(); - const minimumGas = calculateMinGasRequired(numberOfTransactions); + const gasLimits = useAtomValue(gasLimitsAtom); + const gasPrice = useAtomValue(minimumGasPriceAtom); - if (!minimumGas || minimumGas.eq(0)) return <>; + if (!gasLimits.isSuccess || !gasPrice.isSuccess) return <>; return (
Transaction fee:{" "}
); diff --git a/apps/namadillo/src/App/Governance/SubmitVote.tsx b/apps/namadillo/src/App/Governance/SubmitVote.tsx index be7c1d668..5eca097f5 100644 --- a/apps/namadillo/src/App/Governance/SubmitVote.tsx +++ b/apps/namadillo/src/App/Governance/SubmitVote.tsx @@ -175,6 +175,7 @@ export const WithProposalId: React.FC<{ proposalId: bigint }> = ({