Rename QrCode file name and show qrCodePayload instead of pixTarget below QrCode img

This commit is contained in:
enzoggqs 2022-12-12 14:21:50 -03:00
parent 9d14337426
commit 86ee697b14
2 changed files with 11 additions and 7 deletions

View File

@ -24,6 +24,8 @@ pixQrCode.base64QrCode().then((code: string) => {
qrCodePayload.value = pixQrCode.payload();
console.log(qrCodePayload);
const handleInputEvent = (event: any) => {
const { value } = event.target;
@ -73,13 +75,15 @@ const validatePix = async (e2eid: any) => {
</div>
<div class="blur-container max-w-[28rem] text-black">
<div
class="flex-col items-center justify-center flex w-full bg-white p-8 rounded-lg"
class="flex-col items-center justify-center flex w-full bg-white p-8 rounded-lg break-normal"
>
<img :src="qrCode" class="w-48 h-48" />
<span class="text-center font-bold">Código pix</span>
<span class="text-center text-xs">
{{ pixTarget }}
</span>
<div class="break-words w-4/5">
<span class="text-center text-xs">
{{ qrCodePayload }}
</span>
</div>
<img
alt="Copy PIX code"
src="@/assets/copyPix.svg"

View File

@ -9,7 +9,7 @@ import p2pix from "../utils/smart_contract_files/P2PIX.json";
import addresses from "../utils/smart_contract_files/localhost.json";
import { useEtherStore } from "@/store/ether";
import { ethers } from "ethers";
import QrCodeForm from "../components/QrCodeForm.vue";
import QrCodeComponent from "../components/QrCodeComponent.vue";
import { storeToRefs } from "pinia";
enum Step {
@ -33,7 +33,7 @@ const confirmBuyClick = async ({ selectedDeposit, tokenValue }: any) => {
.mapDeposits(depositId)
.then((deposit) => (depositDetail = deposit));
console.log(tokenValue);
console.log(depositDetail);
console.log('aqui', depositDetail);
tokens.value = tokenValue;
pixTarget.value = depositDetail?.pixTarget;
@ -69,7 +69,7 @@ const confirmBuyClick = async ({ selectedDeposit, tokenValue }: any) => {
<template>
<SearchComponent v-if="(flowStep == Step.Search)" @token-buy="confirmBuyClick" />
<div v-if="(flowStep == Step.Buy)">
<QrCodeForm
<QrCodeComponent
:pixTarget="pixTarget"
:tokenValue="tokens"
v-if="!loadingLock"