Create Modal to redirect to active lock

This commit is contained in:
enzoggqs
2023-02-09 16:44:11 -03:00
committed by RcleydsonR
parent eabc54e5dd
commit 48972a6437
3 changed files with 60 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ import BuyConfirmedComponent from "@/components/BuyConfirmedComponent/BuyConfirm
import { ref, onMounted } from "vue";
import { useEtherStore } from "@/store/ether";
import QrCodeComponent from "@/components/QrCodeComponent.vue";
import CustomModal from "@/components/CustomModal.vue";
import { storeToRefs } from "pinia";
import { addLock, releaseLock } from "@/blockchain/buyerMethods";
import {
@@ -31,6 +32,7 @@ const pixTarget = ref<number>();
const tokenAmount = ref<number>();
const _lockID = ref<string>("");
const loadingRelease = ref<boolean>(false);
const showModal = ref<boolean>(true);
const lastWalletReleaseTransactions = ref<Event[]>([]);
const confirmBuyClick = async (
@@ -94,6 +96,12 @@ onMounted(async () => {
v-if="flowStep == Step.Search"
@token-buy="confirmBuyClick"
/>
<CustomModal
v-if="flowStep == Step.Search && showModal"
:isRedirectModal="true"
@close-modal="showModal = false"
@go-to-lock="flowStep = Step.Buy"
/>
<div v-if="flowStep == Step.Buy">
<QrCodeComponent
:pixTarget="String(pixTarget)"