diff --git a/apps/namadillo/src/App/Common/TransactionFees.tsx b/apps/namadillo/src/App/Common/TransactionFees.tsx index 56b461c92..0a5f3341f 100644 --- a/apps/namadillo/src/App/Common/TransactionFees.tsx +++ b/apps/namadillo/src/App/Common/TransactionFees.tsx @@ -1,8 +1,8 @@ +import { gasLimitsAtom, minimumGasPriceAtom } from "atoms/fees"; import clsx from "clsx"; import { useAtomValue } from "jotai"; -import { TxKind, gasLimitsAtom, minimumGasPriceAtom } from "slices/fees"; +import { TxKind } from "types"; import { NamCurrency } from "./NamCurrency"; -import { TextLink } from "./TextLink"; type TransactionFeesProps = { txKind: TxKind; @@ -18,15 +18,17 @@ export const TransactionFees = ({ const gasLimits = useAtomValue(gasLimitsAtom); const gasPrice = useAtomValue(minimumGasPriceAtom); - if (!gasLimits.isSuccess || !gasPrice.isSuccess) return <>; + if (!gasLimits.isSuccess || !gasPrice.isSuccess || numberOfTransactions === 0) + return <>; + return (
- Transaction fee:{" "} + Transaction fee:{" "}
diff --git a/apps/namadillo/src/atoms/fees/services.ts b/apps/namadillo/src/atoms/fees/services.ts index 657dad217..06a827d32 100644 --- a/apps/namadillo/src/atoms/fees/services.ts +++ b/apps/namadillo/src/atoms/fees/services.ts @@ -30,7 +30,8 @@ export const fetchMinimumGasPrice = async ( ({ token }) => token === nativeToken ); invariant(!!nativeTokenCost, "Error querying minimum gas price"); - const asBigNumber = new BigNumber(nativeTokenCost.amount); + // TODO: this should be removed after indexer error is fixed! + const asBigNumber = new BigNumber(nativeTokenCost.amount).dividedBy(100000); invariant( !asBigNumber.isNaN(), "Error converting minimum gas price to BigNumber"