Improve code quality by fixing lint issues

Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
RcleydsonR
2023-01-17 19:32:29 -03:00
parent 8338064dcd
commit c8a3fd12b2
8 changed files with 78 additions and 69 deletions

View File

@@ -10,7 +10,7 @@ import { storeToRefs } from "pinia";
import { addLock, releaseLock } from "@/blockchain/buyerMethods";
import { updateWalletStatus } from "@/blockchain/wallet";
import { getNetworksLiquidity } from "@/blockchain/events";
import { listReleaseTransactionByWalletAddress } from "@/blockchain/wallet"
import { listReleaseTransactionByWalletAddress } from "@/blockchain/wallet";
enum Step {
Search,
@@ -46,7 +46,7 @@ const confirmBuyClick = async (selectedDeposit: any, tokenValue: number) => {
lockTransactionHash.value = lock.transactionHash;
})
.catch((err) => {
console.log(err)
console.log(err);
flowStep.value = Step.Search;
});
@@ -75,21 +75,21 @@ const releaseTransaction = async ({ e2eId }: any) => {
);
release.wait();
await listReleaseTransactionByWalletAddress(walletAddress.value.toLowerCase())
.then((releaseTransactions) => {
if (releaseTransactions)
lastWalletReleaseTransactions.value = releaseTransactions;
});
await listReleaseTransactionByWalletAddress(
walletAddress.value.toLowerCase()
).then((releaseTransactions) => {
if (releaseTransactions)
lastWalletReleaseTransactions.value = releaseTransactions;
});
await updateWalletStatus();
loadingRelease.value = false;
}
};
onMounted(async () => {
await getNetworksLiquidity();
})
});
</script>
<template>

View File

@@ -5,7 +5,7 @@ import ListingComponent from "@/components/ListingComponent.vue";
import type { BigNumber } from "ethers";
import { ref, watch } from "vue";
import { cancelDeposit, withdrawDeposit } from "@/blockchain/buyerMethods";
import { listValidDepositTransactionsByWalletAddress } from "@/blockchain/wallet"
import { listValidDepositTransactionsByWalletAddress } from "@/blockchain/wallet";
const etherStore = useEtherStore();
@@ -13,10 +13,9 @@ const { walletAddress } = storeToRefs(etherStore);
const depositList = ref<any[]>([]);
if (walletAddress.value) {
const walletDeposits =
await listValidDepositTransactionsByWalletAddress(
walletAddress.value
);
const walletDeposits = await listValidDepositTransactionsByWalletAddress(
walletAddress.value
);
if (walletDeposits) {
depositList.value = walletDeposits;
}
@@ -39,10 +38,9 @@ const handleWithDrawDeposit = async (depositID: BigNumber, index: number) => {
};
watch(walletAddress, async () => {
const walletDeposits =
await listValidDepositTransactionsByWalletAddress(
walletAddress.value
);
const walletDeposits = await listValidDepositTransactionsByWalletAddress(
walletAddress.value
);
if (walletDeposits) {
depositList.value = walletDeposits;
}

View File

@@ -10,10 +10,9 @@ const { walletAddress } = storeToRefs(etherStore);
const allUserTransactions = ref<any[]>([]);
if (walletAddress.value) {
await listAllTransactionByWalletAddress(walletAddress.value)
.then((res) => {
if (res) allUserTransactions.value = res;
});
await listAllTransactionByWalletAddress(walletAddress.value).then((res) => {
if (res) allUserTransactions.value = res;
});
}
watch(walletAddress, async (newValue) => {