Release integration with qrcode component and list component

This commit is contained in:
Bruno
2022-12-13 22:17:22 -03:00
parent 4aec263463
commit 19b307343d
4 changed files with 73 additions and 50 deletions

View File

@@ -1,14 +1,28 @@
<script setup lang="ts">
import CustomButton from "@/components/CustomButton.vue";
import { useEtherStore } from "@/store/ether";
import { BigNumber } from "ethers";
import blockchain from "../utils/blockchain";
// props and store references
const props = defineProps({
lastWalletTransactions: Array,
tokenAmmount: Number,
tokenAmmount: BigNumber,
});
const teste = (amount: any) => {
console.log(amount);
console.log("Teste");
};
const formatEventsAmount = (amount: any) => {
try {
const formated = blockchain.formatBigNumber(amount);
return formated;
} catch {
return "";
}
};
const openEtherscanUrl = (url: string) => {
window.open(url, "_blank");
};
@@ -28,7 +42,9 @@ const openEtherscanUrl = (url: string) => {
>
<div>
<p>Tokens recebidos</p>
<p class="text-2xl text-gray-900">{{ props.tokenAmmount }} BRZ</p>
<p class="text-2xl text-gray-900">
{{ teste(props.tokenAmmount) }} BRZ
</p>
</div>
<div class="my-5">
<p>
@@ -70,7 +86,7 @@ const openEtherscanUrl = (url: string) => {
:key="deposit?.blockNumber"
>
<p class="last-deposit-info">
{{ blockchain.formatBigNumber(deposit?.args.amount) }} BRZ
{{ formatEventsAmount(deposit?.args.amount) }} BRZ
</p>
<p class="last-deposit-info">
{{

View File

@@ -69,7 +69,7 @@ const validatePix = async () => {
<template>
<div class="page">
<h2>{{e2eId}}</h2>
<h2>{{ e2eId }}</h2>
<div class="text-container">
<span class="text font-extrabold text-2xl max-w-[30rem]">
Utilize o QR Code ou copie o código para realizar o Pix
@@ -147,7 +147,7 @@ const validatePix = async () => {
<CustomButton
:is-disabled="isPixValid == false"
:text="'Enviar para a rede'"
@button-clicked="emit('pixValidated', e2eId)"
@button-clicked="emit('pixValidated', { e2eId })"
/>
</div>
</div>