fix: when widget closed stop watching payment

This commit is contained in:
Carlos Garcia Ortiz karliatto 2020-10-25 12:47:35 +01:00
parent 7cac6ba7fc
commit e7acaf7821
1 changed files with 5 additions and 0 deletions

View File

@ -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() {