From 0ef9c4db101b7ead9eebcdc9177d4463ae37d304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 26 Mar 2024 10:41:36 +0100 Subject: [PATCH] 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 --- lnbits/static/js/wallet.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lnbits/static/js/wallet.js b/lnbits/static/js/wallet.js index dfc0b0084..61e6eec02 100644 --- a/lnbits/static/js/wallet.js +++ b/lnbits/static/js/wallet.js @@ -818,10 +818,8 @@ new Vue({ } }, watch: { - payments: function (_, oldVal) { - if (oldVal && oldVal.length !== 0) { - this.fetchBalance() - } + payments: function () { + this.fetchBalance() }, 'paymentsChart.group': function () { this.showChart() @@ -839,7 +837,6 @@ new Vue({ this.mobileSimple = true } this.fetchPayments() - this.balance = Math.floor(window.wallet.balance_msat / 1000) this.update.name = this.g.wallet.name this.update.currency = this.g.wallet.currency