Skip to content

Commit

Permalink
fix(fees): query gas fees by chain ID (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Aug 25, 2023
1 parent 5946752 commit 34bb111
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helpers/fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 34bb111

Please sign in to comment.