fix: deleting the wallet did not update lastActiveWallet (#3628)

This commit is contained in:
dni ⚡
2025-12-06 14:46:17 +01:00
committed by GitHub
parent 89d673448a
commit 71e0b396d2
4 changed files with 9 additions and 8 deletions
@@ -29,7 +29,12 @@ window.app.component('lnbits-wallet-extra', {
.onOk(() => {
LNbits.api
.deleteWallet(this.g.wallet)
.then(_ => {
.then(() => {
this.g.user.wallets = this.g.user.wallets.filter(
w => w.id !== this.g.wallet.id
)
this.g.lastActiveWallet = this.g.user.wallets[0].id
this.$router.push(`/wallet/${this.g.lastActiveWallet}`)
Quasar.Notify.create({
timeout: 3000,
message: `Wallet deleted!`,