From e7acaf7821ac813e05c2b415b5a7153d2dbfa4a0 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Ortiz karliatto Date: Sun, 25 Oct 2020 12:47:35 +0100 Subject: [PATCH] fix: when widget closed stop watching payment --- files/assets/lnme.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/assets/lnme.js b/files/assets/lnme.js index 50bb659..01569c8 100644 --- a/files/assets/lnme.js +++ b/files/assets/lnme.js @@ -210,6 +210,11 @@ class LnMe { shouldSetHash: false }); this.target = document.querySelector('.jPopup .content').firstElementChild; + + // When popup is closed, we stop watching the payment. + document.querySelector('.jCloseBtn').addEventListener('click', (e) => { + this.stopWatchingPayment(); + }); } thanks() {