liming 3 주 전
부모
커밋
9c4204f5cd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/stores/modules/walletStore.js

+ 1 - 1
src/stores/modules/walletStore.js

@@ -89,6 +89,7 @@ export const useWalletStore = defineStore("useWalletStore", {
         this.account = account.address;
         this.isAuthenticated = true;
         this.chainId =  `${await web3.eth.getChainId()}n`;
+        this.id = `${this.account}@${this.accountName}`
         await this.getBalance(); 
         this.addWallet()
         return {
@@ -108,7 +109,6 @@ export const useWalletStore = defineStore("useWalletStore", {
 
     // 添加钱包
     addWallet() { 
-      this.id = `${this.account}@${this.accountName}`
       const data = cloneDeep(this.$state)
       Reflect.deleteProperty(data, "walletList");
       if(this.walletList.length = 0) {