mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-07 19:38:13 +02:00
fix: multiple ws connections (#2907)
This commit is contained in:
parent
273ab9781f
commit
56a4b702f3
2
lnbits/static/bundle.min.js
vendored
2
lnbits/static/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@ -450,15 +450,16 @@ if (!window.g) {
|
||||
wallets: [],
|
||||
payments: [],
|
||||
allowedThemes: null,
|
||||
langs: []
|
||||
langs: [],
|
||||
walletEventListeners: []
|
||||
})
|
||||
}
|
||||
|
||||
window.windowMixin = {
|
||||
inject: ['g'],
|
||||
i18n: window.i18n,
|
||||
data() {
|
||||
return {
|
||||
g: window.g,
|
||||
toggleSubs: true,
|
||||
updatePayments: false,
|
||||
updatePaymentsHash: '',
|
||||
@ -469,7 +470,7 @@ window.windowMixin = {
|
||||
gradientChoice:
|
||||
this.$q.localStorage.getItem('lnbits.gradientBg') || false,
|
||||
isUserAuthorized: false,
|
||||
eventListeners: [],
|
||||
walletEventListeners: [],
|
||||
backgroundImage: ''
|
||||
}
|
||||
},
|
||||
@ -487,9 +488,10 @@ window.windowMixin = {
|
||||
this.refreshRoute()
|
||||
},
|
||||
paymentEvents() {
|
||||
this.g.walletEventListeners = this.g.walletEventListeners || []
|
||||
this.g.user.wallets.forEach(wallet => {
|
||||
if (!this.eventListeners.includes(wallet.id)) {
|
||||
this.eventListeners.push(wallet.id)
|
||||
if (!this.g.walletEventListeners.includes(wallet.id)) {
|
||||
this.g.walletEventListeners.push(wallet.id)
|
||||
LNbits.events.onInvoicePaid(wallet, data => {
|
||||
const walletIndex = this.g.user.wallets.findIndex(
|
||||
w => w.id === wallet.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user