diff --git a/composables/zksync/deposit/useFee.ts b/composables/zksync/deposit/useFee.ts index fb843580f..2f6940734 100644 --- a/composables/zksync/deposit/useFee.ts +++ b/composables/zksync/deposit/useFee.ts @@ -17,6 +17,7 @@ export type DepositFeeValues = { export default (tokens: Ref, balances: Ref) => { const { getPublicClient } = useOnboardStore(); const { getL1VoidSigner } = useZkSyncWalletStore(); + const { requestProvider } = useZkSyncProviderStore(); let params = { to: undefined as string | undefined, @@ -86,8 +87,11 @@ export default (tokens: Ref, balances: Ref) recommendedBalance.value = undefined; if (!feeToken.value) throw new Error("Fee tokens is not available"); + const provider = requestProvider(); + const isEthBasedChain = await provider.isEthBasedChain(); + try { - if (params.tokenAddress === feeToken.value?.address) { + if (isEthBasedChain && params.tokenAddress === feeToken.value?.address) { fee.value = await getEthTransactionFee(); } else { fee.value = getERC20TransactionFee();