apply network transition when change network on top bar

Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
RcleydsonR
2023-01-09 19:33:18 -03:00
parent d09f6c45cf
commit 6a4884aec9
3 changed files with 116 additions and 89 deletions

View File

@@ -1,9 +1,11 @@
import { NetworkEnum } from "@/model/NetworkEnum";
import { defineStore } from "pinia";
export const useEtherStore = defineStore("ether", {
state: () => ({
walletAddress: "",
balance: "",
networkName: NetworkEnum.ethereum,
loadingLock: false,
sellerView: false,
// Depósitos válidos para compra
@@ -26,6 +28,9 @@ export const useEtherStore = defineStore("ether", {
setBalance(balance: string) {
this.balance = balance;
},
setNetworkName(networkName: NetworkEnum) {
this.networkName = networkName;
},
setLoadingLock(isLoadingLock: boolean) {
this.loadingLock = isLoadingLock;
},