Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 10 additions & 39 deletions src/components/assets/Account.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,20 @@
<div class="account-bg" :style="{ backgroundImage: `url(${bg})` }" />

<div class="wallet-tab">
<div v-if="isLockdropAccount && !isZkEvm" class="row--lockdrop">
<div v-if="isLockdropAccount" class="row--lockdrop">
<span>{{ $t('assets.lockdropAccount') }}</span>
<span class="text--switch-account" @click="toggleEvmWalletSchema">
{{ $t(isH160 ? 'assets.switchToNative' : 'assets.switchToEvm') }}
</span>
</div>
<div v-else />
<div class="wallet-tab__bg">
<template v-if="isH160">
<template v-if="isZkEvm">
<template v-if="currentNetworkIdx === endpointKey.ASTAR_ZKEVM">
<a class="btn" href="/astar/assets"> Astar EVM (L1) </a>
<div class="btn active">Astar zkEVM</div>
</template>
<template v-if="currentNetworkIdx === endpointKey.ZKYOTO">
<a class="btn" href="/shibuya-testnet/assets"> Shibuya EVM (L1) </a>
<div class="btn active">Astar zKyoto</div>
</template>
</template>

<template v-else>
<div class="btn active">
{{ currentNetworkName.replace('Network', '') }}
EVM (L1)
</div>
<a
v-if="currentNetworkIdx === endpointKey.SHIBUYA"
class="btn"
href="/zkyoto-testnet/assets"
>
Astar zKyoto
</a>
<a
v-else-if="currentNetworkIdx === endpointKey.ASTAR"
href="/astar-zkevm/assets"
class="btn"
>
Astar zkEVM
</a>
</template>
</template>
<div v-if="isH160">
<div class="btn active">
{{ currentNetworkName.replace('Network', '') }}
EVM (L1)
</div>
</div>

<!-- Native -->
<div v-else class="btn active">
Expand Down Expand Up @@ -218,7 +191,7 @@ export default defineComponent({
const isH160 = computed<boolean>(() => store.getters['general/isH160Formatted']);
const isEthWallet = computed<boolean>(() => store.getters['general/isEthWallet']);

const { currentNetworkIdx, isZkEvm } = useNetworkInfo();
const { currentNetworkIdx } = useNetworkInfo();

const isWalletConnect = computed<boolean>(() => {
const currentWallet = store.getters['general/currentWallet'];
Expand Down Expand Up @@ -261,11 +234,10 @@ export default defineComponent({
};

watch(
[balance, props, currentAccount, ledger, isZkEvm],
[balance, props, currentAccount, ledger],
() => {
balUsd.value = null;
const h160LockedBal =
isZkEvm.value || !isH160.value ? '0' : String(ledger?.value?.locked.toString());
const h160LockedBal = !isH160.value ? '0' : String(ledger?.value?.locked.toString());
if (!balance.value || !props.nativeTokenUsd) return;

const bal =
Expand Down Expand Up @@ -363,7 +335,6 @@ export default defineComponent({
isAccountUnification,
unifiedAccount,
isAccountUnified,
isZkEvm,
bg,
currentNetworkIdx,
currentNetworkName,
Expand Down
Loading