From 34bb111aa334b244603b9a9549042366f98f0191 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Fri, 25 Aug 2023 18:38:39 +0400 Subject: [PATCH] fix(fees): query gas fees by chain ID (#40) --- helpers/fees.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helpers/fees.ts b/helpers/fees.ts index fab7d3e6..1b22a019 100644 --- a/helpers/fees.ts +++ b/helpers/fees.ts @@ -39,7 +39,9 @@ export const fetchCCMFees = async (network: string) => { throw new Error("getEndpoints: API endpoint not found"); } - const url = `${API}/zeta-chain/crosschain/convertGasToZeta?chain=${network}&gasLimit=${GAS_LIMIT}`; + const chainID = getHardhatConfigNetworks()[network].chainId; + + const url = `${API}/zeta-chain/crosschain/convertGasToZeta?chainId=${chainID}&gasLimit=${GAS_LIMIT}`; const { data } = await axios.get(url); const gasFee = ethers.BigNumber.from(data.outboundGasInZeta);