diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index b023ca8..de35dd6 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -12,10 +12,9 @@ import { ethers } from "ethers"; import QrCodeForm from "../components/QrCodeForm.vue"; import { storeToRefs } from "pinia"; - enum Step { Search, - Buy + Buy, } // States @@ -29,7 +28,7 @@ const confirmBuyClick = async ({ selectedDeposit, tokenValue }: any) => { // finish buy screen console.log(selectedDeposit); let depositDetail; - const depositId = selectedDeposit["args"]["depositID"] + const depositId = selectedDeposit["args"]["depositID"]; await blockchain .mapDeposits(depositId) .then((deposit) => (depositDetail = deposit)); @@ -40,16 +39,12 @@ const confirmBuyClick = async ({ selectedDeposit, tokenValue }: any) => { // Makes lock with deposit ID and the Amount if (depositDetail) { - flowStep.value = Step.Buy + flowStep.value = Step.Buy; etherStore.setLoadingLock(true); - const lock = await blockchain.addLock( - depositId, - tokenValue - ).catch((_error) => { - flowStep.value = Step.Search - }) - console.log(lock); + await blockchain.addLock(depositId, tokenValue).catch((_error) => { + flowStep.value = Step.Search; + }); // (TO DO) Tirar isso daqui const window_ = window as any;