From 912a7e1c4b83d9cc61e238193c8270cfdd3f898f Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Thu, 7 Jul 2022 14:21:30 +0300 Subject: [PATCH] feat: add web-socket to mempool; & replace UI mappings --- .../satspay/templates/satspay/display.html | 152 +++++++++++++----- lnbits/extensions/satspay/views.py | 2 +- 2 files changed, 109 insertions(+), 45 deletions(-) diff --git a/lnbits/extensions/satspay/templates/satspay/display.html b/lnbits/extensions/satspay/templates/satspay/display.html index a18fb8837..4e1df2c09 100644 --- a/lnbits/extensions/satspay/templates/satspay/display.html +++ b/lnbits/extensions/satspay/templates/satspay/display.html @@ -3,7 +3,9 @@
-
{{ charge.description }}
+
+ +
-
- Charge ID: {{ charge.id }} -
- {% raw %} Total to pay: {{ charge.amount }}sats
- Amount paid: {{ charge.balance }}

- Amount due: {{ charge.amount - charge.balance }}sats {% endraw %} -
+
+
Charge Id:
+
+ +
+
+
+
Total to pay:
+
+ sats +
+
+
+
Amount paid:
+
+ sats +
+
+
+
Amount due:
+
+ sats +
+
@@ -119,23 +135,22 @@ >
-
- Pay this
- lightning-network invoice
-
- + Pay this lightning-network invoice: +
+ +
@@ -145,7 +160,7 @@ Copy invoice
@@ -169,23 +184,23 @@ >
-
- Send {{ charge.amount }}sats
- to this onchain address
-
-
+ Send + + sats to this onchain address + + @@ -195,7 +210,7 @@ Copy address
@@ -210,7 +225,7 @@ + diff --git a/lnbits/extensions/satspay/views.py b/lnbits/extensions/satspay/views.py index 67dfe1a09..d4fc457df 100644 --- a/lnbits/extensions/satspay/views.py +++ b/lnbits/extensions/satspay/views.py @@ -34,5 +34,5 @@ async def display(request: Request, charge_id: str): inkey = wallet.inkey if wallet else None return satspay_renderer().TemplateResponse( "satspay/display.html", - {"request": request, "charge": charge.dict(), "wallet_inkey": inkey}, + {"request": request, "charge_data": charge.dict(), "wallet_inkey": inkey}, )