Skip to content

Commit

Permalink
hotfix: merge the hotfix to main (#1261)
Browse files Browse the repository at this point in the history
* add zkEVM under maintenance banner (#1260)

* Put back Yoki Origins banner (#1262)

* feat: removed weETH and added DOT on zkEVM (#1264)

* feat: added DOT token

* feat: removed weETH

---------

Co-authored-by: Bobo <bobo.kovacevic@gmail.com>
Co-authored-by: Roy <92044428+impelcrypto@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 25, 2024
1 parent 4dc2fa8 commit 2367664
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 29 deletions.
49 changes: 49 additions & 0 deletions src/components/header/UnderMaintenanceBanner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<template>
<div class="banner">
<span>
<span class="text--attention">{{ $t('warning.attention') }}</span>
<span>{{ $t('warning.zkevmUnderMaintenance') }}</span>
</span>
</div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
setup() {
return {};
},
});
</script>

<style lang="scss" scoped>
@import 'src/css/quasar.variables.scss';
.banner {
background-color: $border-yellow;
color: $navy-2;
font-weight: 600;
padding: 4px 8px 8px 8px;
font-size: 12px;
position: relative;
z-index: 2;
display: flex;
align-items: center;
@media (min-width: $sm) {
font-size: 14px;
padding: 4px 16px 8px 16px;
}
}
.text--attention {
font-weight: 800;
padding: 3px 9px;
border-radius: 4px;
border: 1px solid $navy-2;
margin-right: 4px;
@media (min-width: $sm) {
margin-right: 8px;
}
}
</style>
2 changes: 2 additions & 0 deletions src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export default {
'We have switched our zkEVM testnet to zKyoto from zKatana. zKatana will no longer available.',
xcmEvmTokenIsDisabled: 'Withdrawing {token} via EVM wallets is temporarily disabled',
notEnoughFeeToken: "You don't have enough {token} for the withdrawal fee",
zkevmUnderMaintenance:
'Astar zkEVM is currently under maintenance due to an upgrade that applies the latest fixes. We apologize for any inconvenience.',
},
toast: {
transactionFailed: 'Transaction failed with error: {message}',
Expand Down
3 changes: 2 additions & 1 deletion src/layouts/DashboardLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</template>
<div class="wrapper--dashboard-layout__inner">
<portal-header />
<!-- <under-maintenance-banner /> -->
<yoki-banner :network="currentNetworkIdx" />
<main id="assets-top" class="wrapper--main">
<div class="wrapper--components">
Expand All @@ -25,7 +26,7 @@ import SidebarDesktop from 'components/sidenav/SidebarDesktop.vue';
import { useQuasar } from 'quasar';
import { LOCAL_STORAGE } from 'src/config/localStorage';
import { useStore } from 'src/store';
import ClaimWarningBanner from 'src/components/header/ClaimWarningBanner.vue';
import UnderMaintenanceBanner from 'src/components/header/UnderMaintenanceBanner.vue';
import YokiBanner from 'src/components/header/YokiBanner.vue';
export default defineComponent({
Expand Down
12 changes: 11 additions & 1 deletion src/modules/zk-evm-bridge/l1-bridge/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,17 @@ export const handleAddDefaultTokens = (): void => {
seen.add(`${token.srcChainId}-${token.address}`);
return !duplicate;
});
localStorage.setItem(LOCAL_STORAGE.EVM_TOKEN_IMPORTS, JSON.stringify(updatedTokens));

// Todo: this is temporary solution to remove weETH from browser's localstorage
// This will be removed after OFT weETH is added to Astar zkEVM assets
const filteredTokens = updatedTokens.filter((token) => {
const weEthEthereum = '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee';
const weEthZkevm = '0xcD68DFf4415358c35a28f96Fd5bF7083B22De1D6';
const address = token.address.toLowerCase();
return address !== weEthEthereum.toLowerCase() && address !== weEthZkevm.toLowerCase();
});

localStorage.setItem(LOCAL_STORAGE.EVM_TOKEN_IMPORTS, JSON.stringify(filteredTokens));
} catch (error) {
console.error(error);
}
Expand Down
58 changes: 31 additions & 27 deletions src/modules/zk-evm-bridge/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ export const TOKEN_BLACKLIST = [
'0xE9CC37904875B459Fa5D0FE37680d36F1ED55e38',
// STONE (Ethereum)
'0x7122985656e38BDC0302Db86685bb972b145bD3C',
// STONE (Astar zkEVM)
// STONE (Astar zkEVM, OFT)
'0x80137510979822322193fc997d400d5a6c747bf7',
// weETH (Ethereum)
'0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee',
// Todo: add weETH(Astar zkEVM, OFT)
];

export const addressAstrZkEvm = '0xdf41220C7e322bFEF933D85D01821ad277f90172';
Expand Down Expand Up @@ -93,32 +96,6 @@ export const DEFAULT_TOKENS = [
bridgedTokenAddress: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
bridgedChainId: 1,
},
{
srcChainId: 1,
address: '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee',
decimal: '18',
symbol: 'weETH',
name: 'Wrapped eETH',
image: 'https://assets.coingecko.com/coins/images/33033/standard/weETH.png?1701438396',
isWrappedToken: false,
isXC20: false,
bridgeUrl: null,
bridgedTokenAddress: '0xcD68DFf4415358c35a28f96Fd5bF7083B22De1D6',
bridgedChainId: 3776,
},
{
srcChainId: 3776,
address: '0xcD68DFf4415358c35a28f96Fd5bF7083B22De1D6',
decimal: '18',
symbol: 'weETH',
name: 'Wrapped eETH',
image: 'https://assets.coingecko.com/coins/images/33033/standard/weETH.png?1701438396',
isWrappedToken: false,
isXC20: false,
bridgeUrl: null,
bridgedTokenAddress: '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee',
bridgedChainId: 1,
},
{
srcChainId: 1,
address: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
Expand Down Expand Up @@ -292,4 +269,31 @@ export const DEFAULT_TOKENS = [
bridgedTokenAddress: '',
bridgedChainId: 1,
},
{
srcChainId: 3776,
address: '0x7Cb5d4D178d93D59ea0592abF139459957898a59',
decimal: '18',
symbol: 'DOT',
name: 'DOT Token',
image: 'https://assets.coingecko.com/coins/images/12171/standard/polkadot.png?1696512008',
isWrappedToken: false,
isXC20: false,
bridgeUrl: 'https://stargate.finance/transfer',
bridgedTokenAddress: '',
bridgedChainId: 1,
},
// This will be updated after OFT weETH is added
// {
// srcChainId: 3776,
// address: '',
// decimal: '18',
// symbol: 'weETH',
// name: 'Wrapped eETH',
// image: 'https://assets.coingecko.com/coins/images/33033/standard/weETH.png?1701438396',
// isWrappedToken: false,
// isXC20: false,
// bridgeUrl: 'https://stargate.finance/transfer',
// bridgedTokenAddress: '',
// bridgedChainId: 1,
// },
];

0 comments on commit 2367664

Please sign in to comment.