diff --git a/src/pages/WalletPage.vue b/src/pages/WalletPage.vue index 4202df83..21d0168a 100644 --- a/src/pages/WalletPage.vue +++ b/src/pages/WalletPage.vue @@ -2371,7 +2371,9 @@ export default { this.walletURL = this.baseURL; } let activeMintUrl = localStorage.getItem("cashu.activeMintUrl"); - await this.activateMint(activeMintUrl); + // we'll force the activation of the mint for the migration + // from without a pinia store + await this.activateMint(activeMintUrl, false, true); } else { this.setTab("settings"); } @@ -2434,13 +2436,13 @@ export default { ); // startup tasks - this.checkProofsSpendable(this.activeProofs, true).catch((err) => { + await this.checkProofsSpendable(this.activeProofs, true).catch((err) => { return; }); - this.checkPendingInvoices().catch((err) => { + await this.checkPendingInvoices().catch((err) => { return; }); - this.checkPendingTokens().catch((err) => { + await this.checkPendingTokens().catch((err) => { return; }); diff --git a/src/stores/mints.js b/src/stores/mints.js index 1f9ed06d..b021719a 100644 --- a/src/stores/mints.js +++ b/src/stores/mints.js @@ -55,9 +55,12 @@ 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 return; } // we need to stop workers because they will reset the activeMint again