Skip to content

Commit

Permalink
Merge pull request #139 from zkLinkProtocol/feat/wrap_mnt
Browse files Browse the repository at this point in the history
fix:mantle weth and icon url
  • Loading branch information
MickWang authored Apr 18, 2024
2 parents 3e9c624 + e5a5646 commit a721caf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions composables/zksync/deposit/useFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default (
address: res.address,
symbol: "MNT",
decimals: res.decimals,
iconUrl: "/img/mantle.svg",
};
}
return res;
Expand Down
9 changes: 5 additions & 4 deletions composables/zksync/deposit/useMntAndWeth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ export default (selectedToken: Ref<Token | undefined>) => {
weths = weths.concat(item.wethContract.map((e) => e.toLowerCase()));
}
});
console.log(
"isWETHSelected",
selectedToken.value?.address && weths.some((item) => item === selectedToken.value?.address.toLowerCase())

return (
selectedNetwork.value?.key !== "mantle" &&
selectedToken.value?.address &&
weths.some((item) => item === selectedToken.value?.address.toLowerCase())
);
return selectedToken.value?.address && weths.some((item) => item === selectedToken.value?.address.toLowerCase());
});

const isMNTOrWETH = computed(() => {
Expand Down
4 changes: 2 additions & 2 deletions views/transactions/Deposit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
</CommonErrorBlock>

<!--MNT and WETH Tips-->
<CommonHeightTransition v-if="step === 'form'" :opened="!!isMNTOrWETH">
<CommonHeightTransition v-if="step === 'form'" :opened="!!isMNTOrWETH && enoughAllowance">
<CommonCardWithLineButtons class="mt-4">
<DestinationItem as="div">
<template #label>
Expand All @@ -266,7 +266,7 @@

<CommonHeightTransition
v-if="step === 'form'"
:opened="((!enoughAllowance && !continueButtonDisabled) || !!setAllowanceReceipt) && !isMNTOrWETH.value"
:opened="(!enoughAllowance && !continueButtonDisabled) || !!setAllowanceReceipt"
>
<CommonCardWithLineButtons class="mt-4">
<DestinationItem
Expand Down

0 comments on commit a721caf

Please sign in to comment.