fix: mapping of user was done each time component was initialised (#3573)
This commit is contained in:
@@ -1,12 +1,4 @@
|
||||
window.windowMixin = {
|
||||
i18n: window.i18n,
|
||||
data() {
|
||||
return {
|
||||
g: window.g,
|
||||
utils: window._lnbitsUtils,
|
||||
...WINDOW_SETTINGS
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openNewWalletDialog(walletType = 'lightning') {
|
||||
this.g.newWalletType = walletType
|
||||
@@ -115,16 +107,11 @@ window.windowMixin = {
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
if (window.user) {
|
||||
this.g.user = Vue.reactive(window.LNbits.map.user(window.user))
|
||||
created() {
|
||||
// map jinja variable once on pageload
|
||||
if (window.user && !this.g.user) {
|
||||
this.g.user = window.LNbits.map.user(window.user)
|
||||
this.paymentEvents()
|
||||
}
|
||||
if (window.wallet) {
|
||||
this.g.wallet = Vue.reactive(window.LNbits.map.wallet(window.wallet))
|
||||
}
|
||||
if (window.extensions) {
|
||||
this.g.extensions = Vue.reactive(window.extensions)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user