|
@@ -135,7 +135,7 @@ export const useWalletStore = defineStore("useWalletStore", {
|
|
|
}
|
|
|
},
|
|
|
// 删除钱包
|
|
|
- deleteWallet(id, password) {
|
|
|
+ async deleteWallet(id, password) {
|
|
|
const wallet = this.walletList.find(item => item.id === id);
|
|
|
if (!wallet) {
|
|
|
showNotify({ type: 'warning', message: '钱包不存在' });
|
|
@@ -152,6 +152,7 @@ export const useWalletStore = defineStore("useWalletStore", {
|
|
|
if (newList.length > 0) {
|
|
|
// 切换到第一个钱包
|
|
|
this.switchWallet(newList[0].id);
|
|
|
+ await this.loginWithPrivateKey();
|
|
|
router.push({
|
|
|
path: '/wallet'
|
|
|
})
|
|
@@ -164,7 +165,6 @@ export const useWalletStore = defineStore("useWalletStore", {
|
|
|
}
|
|
|
this.isAuthenticated = false;
|
|
|
this.id = '';
|
|
|
-
|
|
|
router.push({
|
|
|
path: '/login'
|
|
|
})
|