Finished refactoring for Sellet flow.

This commit is contained in:
Filipe Soccol
2024-12-02 12:17:47 -03:00
parent c4dae86b5f
commit c90f468d3c
4 changed files with 28 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
import { NetworkEnum, TokenEnum } from "../model/NetworkEnum";
import type { ValidDeposit } from "@/model/ValidDeposit";
import { Participant } from "@/utils/bbPay";
import { defineStore } from "pinia";
export const useEtherStore = defineStore("ether", {
@@ -13,6 +14,8 @@ export const useEtherStore = defineStore("ether", {
depositsValidList: [] as ValidDeposit[],
loadingWalletTransactions: false,
loadingNetworkLiquidity: false,
seller: {} as Participant,
sellerId: "",
}),
actions: {
setWalletAddress(walletAddress: string) {
@@ -42,6 +45,12 @@ export const useEtherStore = defineStore("ether", {
setLoadingNetworkLiquidity(isLoadingNetworkLiquidity: boolean) {
this.loadingNetworkLiquidity = isLoadingNetworkLiquidity;
},
setSeller(seller: Participant) {
this.seller = seller;
},
setSellerId(sellerId: string) {
this.sellerId = sellerId;
},
},
getters: {
getValidDepositByWalletAddress: (state) => {