getting liquidity from both networks and saving it at store. splitting methods.ts into 2 different files: buyerMethods.ts and sellerMethods.ts

This commit is contained in:
brunoedcf
2023-01-17 01:55:46 -03:00
parent c546778963
commit 80a70a5240
9 changed files with 223 additions and 116 deletions

View File

@@ -9,7 +9,7 @@ import { connectProvider } from "@/blockchain/provider";
// Store reference
const etherStore = useEtherStore();
const { walletAddress, depositsValidList } = storeToRefs(etherStore);
const { walletAddress, depositsValidListGoerli } = storeToRefs(etherStore);
// Reactive state
const tokenValue = ref(0);
@@ -59,7 +59,7 @@ const verifyLiquidity = () => {
selectedDeposit.value = null;
if (!walletAddress.value || tokenValue.value <= 0) return;
depositsValidList.value.find((element) => {
depositsValidListGoerli.value.find((element) => {
const remaining = element.remaining;
if (
tokenValue.value!! <= remaining &&