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

@@ -8,8 +8,9 @@ import { ref } from "vue";
import { useEtherStore } from "@/store/ether";
import QrCodeComponent from "../components/QrCodeComponent.vue";
import { storeToRefs } from "pinia";
import { addLock, releaseLock } from "@/blockchain/methods";
import { addLock, releaseLock } from "@/blockchain/buyerMethods";
import { updateWalletStatus } from "@/blockchain/wallet";
import { getNetworksLiquidity } from "@/blockchain/events";
enum Step {
Search,
@@ -19,6 +20,7 @@ enum Step {
const etherStore = useEtherStore();
etherStore.setSellerView(false);
getNetworksLiquidity();
// States
const { loadingLock, walletAddress, locksAddedList } = storeToRefs(etherStore);