Skip to content

Commit

Permalink
Merge pull request #220 from zkLinkProtocol/feat/hide_withdraw_mantle
Browse files Browse the repository at this point in the history
hide eth for withdraw in token select modal
  • Loading branch information
zkLeonardo authored May 3, 2024
2 parents 1ae4d2a + fa02f26 commit 571a0ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/common/input/TransactionWithdraw.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:loading="loading"
:tokens="tokens"
:balances="balances"
:title="from==='withdraw'? 'Choose chain and token':''"
:title="from === 'withdraw' ? 'Choose chain and token' : 'Choose token'"
>
<template #body-bottom v-if="$slots['token-dropdown-bottom']">
<slot name="token-dropdown-bottom" />
Expand Down
10 changes: 9 additions & 1 deletion components/token/TokenSelectModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ const changeToken = (item: any) => {
const isNetworkSelected = (network: ZkSyncNetwork) => selectChain.value === network.key;
const chainLists = ref<any[]>([]);
const chainList = ref<any[]>([]);
const isWithdraw = computed(() => {
return props.title === "Choose chain and token";
});
const buttonClicked = async (network: ZkSyncNetwork) => {
if (isNetworkSelected(network)) {
return;
Expand All @@ -237,7 +242,9 @@ const buttonClicked = async (network: ZkSyncNetwork) => {
if (!e.l1Address) {
return false;
}
if (e.l1Address === ETH_ADDRESS) {
if (isWithdraw.value && network.key === "mantle") {
return false;
} else if (e.l1Address === ETH_ADDRESS) {
return true;
}
if (e.networkKey === network.key) {
Expand All @@ -261,6 +268,7 @@ const displayedTokens = computed(() =>
)
)
);
const displayedBalances = computed(
() =>
filterTokens(
Expand Down

0 comments on commit 571a0ab

Please sign in to comment.