hotfix: initial currency conversion on balance (#2346)

* hotfix: initial currency conversion on balance
fiat amount not shown in balance on initial pageload, lets reintroduce the first fetch_balance to fix it.
maybe in the future balance call and wallet itself should give the current fiat value if the wallet uses fiat tracking
This commit is contained in:
dni ⚡ 2024-03-26 10:41:36 +01:00 committed by GitHub
parent c101b85054
commit 0ef9c4db10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -818,10 +818,8 @@ new Vue({
} }
}, },
watch: { watch: {
payments: function (_, oldVal) { payments: function () {
if (oldVal && oldVal.length !== 0) { this.fetchBalance()
this.fetchBalance()
}
}, },
'paymentsChart.group': function () { 'paymentsChart.group': function () {
this.showChart() this.showChart()
@ -839,7 +837,6 @@ new Vue({
this.mobileSimple = true this.mobileSimple = true
} }
this.fetchPayments() this.fetchPayments()
this.balance = Math.floor(window.wallet.balance_msat / 1000)
this.update.name = this.g.wallet.name this.update.name = this.g.wallet.name
this.update.currency = this.g.wallet.currency this.update.currency = this.g.wallet.currency