From efbf34a51e59f2ac116cfa83f7e466e5902068c7 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Fri, 8 Jul 2022 11:01:29 +0300 Subject: [PATCH] feat: show message when new payment detected --- .../satspay/templates/satspay/display.html | 46 +++++++++++-------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/lnbits/extensions/satspay/templates/satspay/display.html b/lnbits/extensions/satspay/templates/satspay/display.html index 701ee1a1..3e72028f 100644 --- a/lnbits/extensions/satspay/templates/satspay/display.html +++ b/lnbits/extensions/satspay/templates/satspay/display.html @@ -66,11 +66,9 @@
Amount due:
- sats +
+ sats +
none @@ -157,10 +155,10 @@
Pay this lightning-network invoice: -
- + >Pay this lightning-network invoice: +
+
@@ -173,13 +171,13 @@
- Copy invoice -
+ Copy invoice +
@@ -189,14 +187,17 @@ -
+
-
+
{ + this.ws.addEventListener('message', async ({data}) => { const res = JSON.parse(data.toString()) console.log('### socker mempool res', res) if (res['address-transactions']) { + console.log('### res', res) + await this.checkBalances() + this.$q.notify({ + type: 'positive', + message: 'New payment received!', + timeout: 10000 + }) } }) },