Fixing blockchain explorer on history

This commit is contained in:
brunoedcf 2023-02-06 21:05:21 -03:00
parent 3bdea04020
commit 6b13d5b84f
9 changed files with 57 additions and 22 deletions

View File

@ -51,7 +51,7 @@ const listValidDepositTransactionsByWalletAddress = async (
const listAllTransactionByWalletAddress = async (
walletAddress: string
): Promise<Event[]> => {
const p2pContract = getContract();
const p2pContract = getContract(true);
const filterDeposits = p2pContract.filters.DepositAdded([walletAddress]);
const eventsDeposits = await p2pContract.queryFilter(filterDeposits);

View File

@ -1,10 +1,13 @@
<script setup lang="ts">
</script>
<script setup lang="ts"></script>
<template>
<div class="modal-overlay inset-0 fixed justify-center backdrop-blur-sm sm:backdrop-blur-none">
<div
class="modal-overlay inset-0 fixed justify-center backdrop-blur-sm sm:backdrop-blur-none"
>
<div class="modal px-5 text-center">
<p class="text-black tracking-tighter leading-tight my-6 mx-2 text-justify">
<p
class="text-black tracking-tighter leading-tight my-6 mx-2 text-justify"
>
<strong>ATENÇÃO!</strong>
A transação será processada após inserir o código de autenticação.
Caso contrário não conseguiremos comprovar o seu depósito e não será
@ -21,7 +24,6 @@
</template>
<style scoped>
.modal-overlay {
display: flex !important;
}
@ -62,5 +64,4 @@ button {
font-size: 14px;
border-radius: 10px;
}
</style>

View File

@ -16,6 +16,12 @@ const etherStore = useEtherStore();
const itemsToShow = ref<(Event | ValidDeposit)[]>([]);
const getExplorer = (): string => {
return etherStore.networkName == NetworkEnum.ethereum
? "Etherscan"
: "Polygonscan";
};
// Methods
const isValidDeposit = (
deposit: Event | ValidDeposit
@ -109,7 +115,7 @@ showInitialItems();
class="flex gap-2 cursor-pointer items-center justify-self-center"
@click="openEtherscanUrl((item as Event)?.transactionHash)"
>
<span class="last-release-info">Etherscan</span>
<span class="last-release-info">{{ getExplorer() }}</span>
<img alt="Redirect image" src="@/assets/redirect.svg" />
</div>
</div>

View File

@ -154,10 +154,7 @@ const validatePix = async (): Promise<void> => {
@button-clicked="emit('pixValidated', e2eId)"
/>
</div>
<CustomModal
v-if="showModal"
@close-modal="showModal = false"
/>
<CustomModal v-if="showModal" @close-modal="showModal = false" />
</div>
</template>

View File

@ -154,7 +154,9 @@ watch(walletAddress, (): void => {
class="sm:w-fit w-4"
src="@/assets/brz.svg"
/>
<span class="text-gray-900 sm:text-lg text-md w-fit" id="brz">BRZ</span>
<span class="text-gray-900 sm:text-lg text-md w-fit" id="brz"
>BRZ</span
>
</div>
</div>

View File

@ -14,10 +14,12 @@ const props = defineProps({
<template>
<div class="page">
<div class="text-container">
<span class="text font-extrabold sm:text-5xl text-xl sm:max-w-[50rem] max-w-[20rem]"
<span
class="text font-extrabold sm:text-5xl text-xl sm:max-w-[50rem] max-w-[20rem]"
>Envie sua oferta para a rede
</span>
<span class="text text-xl font-normal sm:text-base text-xs sm:max-w-[30rem] max-w-[22rem]"
<span
class="text text-xl font-normal sm:text-base text-xs sm:max-w-[30rem] max-w-[22rem]"
>Após a confirmação sua oferta estará disponível para outros usuários.
Caso deseje retirar a oferta, será necessário aguardar 24h para receber
os tokens de volta.</span

View File

@ -65,10 +65,12 @@ const handleButtonClick = async (
<template>
<div class="page w-full">
<div class="text-container">
<span class="text font-extrabold sm:text-5xl text-3xl sm:max-w-[29rem] max-w-[20rem]"
<span
class="text font-extrabold sm:text-5xl text-3xl sm:max-w-[29rem] max-w-[20rem]"
>Venda cripto e receba em Pix</span
>
<span class="text font-medium sm:text-base text-xs sm:max-w-[28rem] max-w-[30rem] sm:tracking-normal tracking-wide"
<span
class="text font-medium sm:text-base text-xs sm:max-w-[28rem] max-w-[30rem] sm:tracking-normal tracking-wide"
>Digite sua oferta, informe a chave Pix, selecione a rede, aprove o
envio da transação e confirme sua oferta.</span
>
@ -99,9 +101,7 @@ const handleButtonClick = async (
class="sm:w-fit w-4"
src="@/assets/brz.svg"
/>
<span class="text-gray-900 w-fit" id="brz">
BRZ
</span>
<span class="text-gray-900 w-fit" id="brz"> BRZ </span>
</div>
</div>

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { storeToRefs } from "pinia";
import { useEtherStore } from "@/store/ether";
import { ref, onBeforeUnmount, onMounted } from "vue";
import { ref } from "vue";
import { onClickOutside } from "@vueuse/core";
import { NetworkEnum } from "@/model/NetworkEnum";
import { connectProvider, requestNetworkChange } from "@/blockchain/provider";

View File

@ -1498,6 +1498,11 @@
dependencies:
vue "^2.5.16"
"@types/web-bluetooth@^0.0.16":
version "0.0.16"
resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz#1d12873a8e49567371f2a75fe3e7f7edca6662d8"
integrity sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==
"@typescript-eslint/eslint-plugin@^5.0.0":
version "5.40.1"
resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.40.1.tgz"
@ -1873,6 +1878,28 @@
resolved "https://registry.npmjs.org/@vue/tsconfig/-/tsconfig-0.1.3.tgz"
integrity sha512-kQVsh8yyWPvHpb8gIc9l/HIDiiVUy1amynLNpCy8p+FoCiZXCo6fQos5/097MmnNZc9AtseDsCrfkhqCrJ8Olg==
"@vueuse/core@^9.12.0":
version "9.12.0"
resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-9.12.0.tgz#e5b20f901e081c7ae5fe0e5f3af217929034eefe"
integrity sha512-h/Di8Bvf6xRcvS/PvUVheiMYYz3U0tH3X25YxONSaAUBa841ayMwxkuzx/DGUMCW/wHWzD8tRy2zYmOC36r4sg==
dependencies:
"@types/web-bluetooth" "^0.0.16"
"@vueuse/metadata" "9.12.0"
"@vueuse/shared" "9.12.0"
vue-demi "*"
"@vueuse/metadata@9.12.0":
version "9.12.0"
resolved "https://registry.yarnpkg.com/@vueuse/metadata/-/metadata-9.12.0.tgz#19a0fefcba6a66a2382af10a7a67ebad6eec1f27"
integrity sha512-9oJ9MM9lFLlmvxXUqsR1wLt1uF7EVbP5iYaHJYqk+G2PbMjY6EXvZeTjbdO89HgoF5cI6z49o2zT/jD9SVoNpQ==
"@vueuse/shared@9.12.0":
version "9.12.0"
resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-9.12.0.tgz#e6597da80084cba8fc3d6545f4c2fa9817b80428"
integrity sha512-TWuJLACQ0BVithVTRbex4Wf1a1VaRuSpVeyEd4vMUWl54PzlE0ciFUshKCXnlLuD0lxIaLK4Ypj3NXYzZh4+SQ==
dependencies:
vue-demi "*"
abab@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291"