fixes wallet ws (#2912)

This commit is contained in:
Arc
2025-01-28 14:14:12 +02:00
committed by GitHub
parent 25e5423511
commit 66b2ca2ac4
3 changed files with 17 additions and 14 deletions
+11 -9
View File
@@ -451,7 +451,9 @@ if (!window.g) {
payments: [],
allowedThemes: null,
langs: [],
walletEventListeners: []
walletEventListeners: [],
updatePayments: false,
updatePaymentsHash: ''
})
}
@@ -461,8 +463,6 @@ window.windowMixin = {
return {
g: window.g,
toggleSubs: true,
updatePayments: false,
updatePaymentsHash: '',
mobileSimple: true,
walletFlip: true,
borderSelection: null,
@@ -528,7 +528,7 @@ window.windowMixin = {
//update the current wallet
if (this.g.wallet.id === data.payment.wallet_id) {
Object.assign(this.g.wallet, this.g.user.wallets[walletIndex])
this.updatePayments = !this.updatePayments
//if on the wallet page and payment is incoming trigger the eventReaction
if (
data.payment.amount > 0 &&
@@ -538,14 +538,16 @@ window.windowMixin = {
}
}
}
this.updatePaymentsHash = data.payment.payment_hash
this.g.updatePaymentsHash = data.payment.payment_hash
this.g.updatePayments = !this.g.updatePayments
})
}
})
},
selectWallet(wallet) {
Object.assign(this.g.wallet, wallet)
this.updatePayments = !this.updatePayments
// this.wallet = this.g.wallet
this.g.updatePayments = !this.g.updatePayments
this.balance = parseInt(wallet.balance_msat / 1000)
const currentPath = this.$route.path
if (currentPath !== '/wallet') {
@@ -663,9 +665,9 @@ window.windowMixin = {
}
let style = document.createElement('style')
style.innerHTML = `
body[data-theme="${this.themeChoice}"] .q-card,
body[data-theme="${this.themeChoice}"] .q-card.q-card--dark,
body[data-theme="${this.themeChoice}"] .q-date,
body[data-theme="${this.themeChoice}"] .q-card,
body[data-theme="${this.themeChoice}"] .q-card.q-card--dark,
body[data-theme="${this.themeChoice}"] .q-date,
body[data-theme="${this.themeChoice}"] .q-date--dark {
${borderStyleCSS}
}