add an .env.example file and fix lint warnings
This commit is contained in:
parent
dbfeb7017f
commit
5f753a62ca
1
.env.example
Normal file
1
.env.example
Normal file
@ -0,0 +1 @@
|
||||
VITE_API_URL=http://localhost:8000/
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -27,3 +27,5 @@ coverage
|
||||
*.sln
|
||||
*.sw?
|
||||
.vercel
|
||||
|
||||
.env
|
@ -32,7 +32,7 @@ const handleInputEvent = (event: any) => {
|
||||
};
|
||||
|
||||
const validatePix = async (e2eid: any) => {
|
||||
if(e2eid == ''){
|
||||
if (e2eid == "") {
|
||||
isPixValid.value = false;
|
||||
isCodeInputEmpty.value = true;
|
||||
return;
|
||||
@ -40,7 +40,7 @@ const validatePix = async (e2eid: any) => {
|
||||
var sellerPixKey = props.pixTarget;
|
||||
var transactionValue = props.tokenValue;
|
||||
|
||||
if(sellerPixKey && transactionValue){
|
||||
if (sellerPixKey && transactionValue) {
|
||||
var body_req = {
|
||||
e2e_id: e2eid,
|
||||
pix_key: sellerPixKey,
|
||||
@ -108,7 +108,10 @@ const validatePix = async (e2eid: any) => {
|
||||
class="text-md w-full box-border p-2 h-6 mb-2 outline-none"
|
||||
/>
|
||||
<div class="custom-divide" v-if="!isCodeInputEmpty"></div>
|
||||
<div class="flex flex-col w-full" v-if="!isPixValid && !isCodeInputEmpty">
|
||||
<div
|
||||
class="flex flex-col w-full"
|
||||
v-if="!isPixValid && !isCodeInputEmpty"
|
||||
>
|
||||
<div class="flex items-center h-8">
|
||||
<img
|
||||
alt="Invalid Icon"
|
||||
|
@ -1,6 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
<script setup lang="ts"></script>
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="text-container">
|
||||
|
@ -8,7 +8,7 @@ const defaultConfig = {
|
||||
|
||||
const api = axios.create({
|
||||
...defaultConfig,
|
||||
baseURL: import.meta.env.VITE_BASE_URL,
|
||||
baseURL: import.meta.env.VITE_API_URL,
|
||||
});
|
||||
|
||||
export default api;
|
||||
|
@ -32,8 +32,6 @@ const confirmBuyClick = async ({ selectedDeposit, tokenValue }: any) => {
|
||||
await blockchain
|
||||
.mapDeposits(depositId)
|
||||
.then((deposit) => (depositDetail = deposit));
|
||||
console.log(tokenValue);
|
||||
console.log('aqui', depositDetail);
|
||||
tokens.value = tokenValue;
|
||||
pixTarget.value = depositDetail?.pixTarget;
|
||||
|
||||
@ -42,7 +40,7 @@ const confirmBuyClick = async ({ selectedDeposit, tokenValue }: any) => {
|
||||
flowStep.value = Step.Buy;
|
||||
etherStore.setLoadingLock(true);
|
||||
|
||||
await blockchain.addLock(depositId, tokenValue).catch((_error) => {
|
||||
await blockchain.addLock(depositId, tokenValue).catch(() => {
|
||||
flowStep.value = Step.Search;
|
||||
});
|
||||
|
||||
@ -67,14 +65,17 @@ const confirmBuyClick = async ({ selectedDeposit, tokenValue }: any) => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<SearchComponent v-if="(flowStep == Step.Search)" @token-buy="confirmBuyClick" />
|
||||
<div v-if="(flowStep == Step.Buy)">
|
||||
<SearchComponent
|
||||
v-if="flowStep == Step.Search"
|
||||
@token-buy="confirmBuyClick"
|
||||
/>
|
||||
<div v-if="flowStep == Step.Buy">
|
||||
<QrCodeComponent
|
||||
:pixTarget="pixTarget"
|
||||
:tokenValue="tokens"
|
||||
v-if="!loadingLock"
|
||||
/>
|
||||
<ValidationComponent v-if="loadingLock"/>
|
||||
<ValidationComponent v-if="loadingLock" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user