From 273ab9781f6d32f1852f21d36c3d4f017d493f76 Mon Sep 17 00:00:00 2001 From: Arc <33088785+arcbtc@users.noreply.github.com> Date: Wed, 22 Jan 2025 08:27:05 +0000 Subject: [PATCH] fix: fiat tracking / updating wallet without reloads (#2891) --- lnbits/core/crud/wallets.py | 1 + lnbits/core/templates/core/wallet.html | 193 ++++++++++++++++++------- lnbits/static/bundle-components.min.js | 2 +- lnbits/static/bundle.min.js | 2 +- lnbits/static/js/base.js | 10 +- lnbits/static/js/components.js | 2 +- lnbits/static/js/wallet.js | 123 ++++++++++++---- lnbits/templates/components.vue | 33 ++++- 8 files changed, 278 insertions(+), 88 deletions(-) diff --git a/lnbits/core/crud/wallets.py b/lnbits/core/crud/wallets.py index f3f3f203..72ea6afc 100644 --- a/lnbits/core/crud/wallets.py +++ b/lnbits/core/crud/wallets.py @@ -23,6 +23,7 @@ async def create_wallet( user=user_id, adminkey=uuid4().hex, inkey=uuid4().hex, + currency=settings.lnbits_default_accounting_currency or "USD", ) await (conn or db).insert("wallets", wallet) return wallet diff --git a/lnbits/core/templates/core/wallet.html b/lnbits/core/templates/core/wallet.html index b19c3144..fcb431b0 100644 --- a/lnbits/core/templates/core/wallet.html +++ b/lnbits/core/templates/core/wallet.html @@ -23,36 +23,119 @@ - -

- - {{LNBITS_DENOMINATION}} - -

+
-
-
+
+ +
+
+
+
+
+
+
+ + {{LNBITS_DENOMINATION}} +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+ + +
+
+ +
+
BTC Price
-
-
-
-
-
-
- + +
+ + :expand-details="expandDetails" + >