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:
@@ -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);
|
||||
|
||||
@@ -5,7 +5,7 @@ import blockchain from "../utils/blockchain";
|
||||
import ListingComponent from "@/components/ListingComponent.vue";
|
||||
import type { BigNumber } from "ethers";
|
||||
import { ref, watch } from "vue";
|
||||
import { cancelDeposit, withdrawDeposit } from "@/blockchain/methods";
|
||||
import { cancelDeposit, withdrawDeposit } from "@/blockchain/buyerMethods";
|
||||
|
||||
const etherStore = useEtherStore();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import WantSellComponent from "../components/SellerSteps/WantSellComponent.vue";
|
||||
import SendNetwork from "../components/SellerSteps/SendNetwork.vue";
|
||||
import ValidationComponent from "../components/LoadingComponent.vue";
|
||||
import { approveTokens, addDeposit } from "../blockchain/methods";
|
||||
import { approveTokens, addDeposit } from "../blockchain/sellerMethods";
|
||||
|
||||
import { ref } from "vue";
|
||||
import { useEtherStore } from "@/store/ether";
|
||||
|
||||
Reference in New Issue
Block a user