feat: remove selectWallet and use path params instead of url params (#3591)

This commit is contained in:
dni ⚡
2025-11-27 12:17:01 +01:00
committed by GitHub
parent ef752cbeca
commit 9c257aa23d
12 changed files with 29 additions and 49 deletions
-18
View File
@@ -60,24 +60,6 @@ window.windowMixin = {
}
})
},
selectWallet(wallet) {
this.g.wallet = wallet
this.g.lastActiveWallet = wallet.id
this.g.updatePayments = !this.g.updatePayments
this.balance = parseInt(wallet.balance_msat / 1000)
const currentPath = this.$route.path
if (currentPath !== '/wallet') {
this.$router.push({
path: '/wallet',
query: {wal: this.g.wallet.id}
})
} else {
this.$router.replace({
path: '/wallet',
query: {wal: this.g.wallet.id}
})
}
},
formatBalance(amount) {
if (LNBITS_DENOMINATION != 'sats') {
return LNbits.utils.formatCurrency(amount / 100, LNBITS_DENOMINATION)