From 5812d795bce8c0c48adba8b600105219d968626d Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Tue, 25 Apr 2023 23:34:54 +0200 Subject: [PATCH] force activation of mint for migration --- src/pages/WalletPage.vue | 2 +- src/stores/mints.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/WalletPage.vue b/src/pages/WalletPage.vue index 6aadec58..6d017edd 100644 --- a/src/pages/WalletPage.vue +++ b/src/pages/WalletPage.vue @@ -2366,7 +2366,7 @@ export default { this.walletURL = this.baseURL; } let activeMintUrl = localStorage.getItem("cashu.activeMintUrl"); - await this.activateMint(activeMintUrl); + await this.activateMint(activeMintUrl, false, true); } else { this.setTab("settings"); } diff --git a/src/stores/mints.js b/src/stores/mints.js index 3d065cda..cda8ccb1 100644 --- a/src/stores/mints.js +++ b/src/stores/mints.js @@ -55,9 +55,9 @@ export const useMintsStore = defineStore("mints", { this.showAddMintDialog = false; } }, - activateMint: async function (url, verbose = false) { + activateMint: async function (url, verbose = false, force = false) { const workers = useWorkersStore(); - if (url === this.activeMintUrl) { + if (url === this.activeMintUrl && !force) { // return here because this function is called repeatedly by the // invoice check and token spendable check workers and would otherwise // run until cleaAllWorkers and kill the woerkers