Skip to content

Commit

Permalink
fix: export transactions link (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 authored Oct 23, 2023
1 parent a54bbd6 commit 70a0c5f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions views/zksync/era/payments/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
</template>
<template #default>Swap</template>
</CommonButton>
<CommonButton v-if="zkExportLink" as="a" target="_blank" :href="zkExportLink">
<template #icon>
<DocumentArrowDownIcon aria-hidden="true" />
</template>
<template #default>Export history</template>
</CommonButton>
</CommonButtonGroup>
<div>
<div class="flex items-center justify-between py-4">
Expand Down Expand Up @@ -50,9 +56,9 @@
</template>

<script lang="ts" setup>
import { onBeforeUnmount } from "vue";
import { computed, onBeforeUnmount } from "vue";
import { ArrowsRightLeftIcon, PaperAirplaneIcon } from "@heroicons/vue/24/outline";
import { ArrowsRightLeftIcon, DocumentArrowDownIcon, PaperAirplaneIcon } from "@heroicons/vue/24/outline";
import { storeToRefs } from "pinia";
import EraTransferLineItem from "@/components/transaction/zksync/era/EraTransferLineItem.vue";
Expand All @@ -66,9 +72,19 @@ const onboardStore = useOnboardStore();
const eraTransfersHistoryStore = useEraTransfersHistoryStore();
const { transfers, recentTransfersRequestInProgress, recentTransfersRequestError } =
storeToRefs(eraTransfersHistoryStore);
const { account } = storeToRefs(onboardStore);
const { destinations } = storeToRefs(useDestinationsStore());
const { eraNetwork } = storeToRefs(useEraProviderStore());
const zkExportLink = computed(() => {
if (eraNetwork.value.key === "era-mainnet" || eraNetwork.value.key === "era-goerli") {
return `https://zkexport.netlify.app/?address=${account.value.address}&network=${eraNetwork.value.key.substring(
4
)}`;
}
return undefined;
});
const fetch = () => {
eraTransfersHistoryStore.requestRecentTransfers();
};
Expand Down
2 changes: 1 addition & 1 deletion views/zksync/lite/payments/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<CommonButton
as="a"
target="_blank"
:href="`https://zkexport.netlify.app/export/account/transactions?address=${account.address}&network=${zkSyncLiteNetwork.network}`"
:href="`https://zkexport-old.netlify.app/export/account/transactions?address=${account.address}&network=${zkSyncLiteNetwork.network}`"
>
<template #icon>
<DocumentArrowDownIcon aria-hidden="true" />
Expand Down

0 comments on commit 70a0c5f

Please sign in to comment.