From e00a81bfbf978e799a7771341ac450709935131e Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Mon, 25 Nov 2024 10:07:26 +0000 Subject: [PATCH] fix: stop the links polling insanity (#72) WTF was this for anyway?! --- static/js/index.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index 52f713e..c80eb60 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -37,7 +37,6 @@ window.app = Vue.createApp({ domain: window.location.host, currencies: [], fiatRates: {}, - checker: null, payLinks: [], payLinksTable: { pagination: { @@ -70,7 +69,6 @@ window.app = Vue.createApp({ this.payLinks = response.data.map(mapPayLink) }) .catch(err => { - clearInterval(this.checker) LNbits.utils.notifyApiError(err) }) }, @@ -178,7 +176,7 @@ window.app = Vue.createApp({ '/lnurlp/api/v1/links/' + linkId, _.findWhere(this.g.user.wallets, {id: link.wallet}).adminkey ) - .then(response => { + .then(() => { this.payLinks = _.reject(this.payLinks, obj => obj.id === linkId) }) .catch(err => { @@ -237,11 +235,7 @@ window.app = Vue.createApp({ }, created() { if (this.g.user.wallets?.length) { - var getPayLinks = this.getPayLinks - getPayLinks() - this.checker = setInterval(() => { - getPayLinks() - }, 20000) + this.getPayLinks() } LNbits.api .request('GET', '/lnurlp/api/v1/currencies')