Skip to content

Commit

Permalink
fix estimate fee for claim withdrawal
Browse files Browse the repository at this point in the history
  • Loading branch information
MickWang committed Apr 24, 2024
1 parent e270c7b commit 6981f82
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions composables/zksync/useWithdrawalFinalization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ export default (transactionInfo: ComputedRef<TransactionInfo>) => {
reload: reloadEstimateFee,
} = usePromise(
async () => {
const eraNetwork = getNetworkInfo(transactionInfo.value) || selectedNetwork.value;
tokensStore.requestTokens();
const publicClient = onboardStore.getPublicClient(network.value.chainId);
const publicClient = onboardStore.getPublicClient(eraNetwork.l1Network?.id);
if (!publicClient) return;
const transactionParams = await getTransactionParams();
const [price, limit] = await Promise.all([
Expand Down Expand Up @@ -151,16 +152,6 @@ export default (transactionInfo: ComputedRef<TransactionInfo>) => {
{ cache: 1000 * 8 }
);

watch(
[network],
() => {
reloadEstimateFee();
},
{
immediate: true,
}
);

const commitTransaction = async () => {
try {
// const network = ref(getNetwork());
Expand Down

0 comments on commit 6981f82

Please sign in to comment.