From 66a28c0a9944de74747b2ae352c153af9436e540 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Mon, 8 Apr 2024 10:28:29 +0100 Subject: [PATCH] Hotfix tip rounding (#77) * event listener for keys * remove event listener when setting tip * remove dead code --- templates/tpos/tpos.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/tpos/tpos.html b/templates/tpos/tpos.html index f1f65d6..665965e 100644 --- a/templates/tpos/tpos.html +++ b/templates/tpos/tpos.html @@ -808,9 +808,6 @@
totalfsat: function () { return LNbits.utils.formatSat(this.totalSat) }, - isRoundValid() { - return this.tipRounding > this.amount - }, roundToSugestion() { switch (true) { case this.amount > 50: @@ -959,7 +956,7 @@
self.atmToken } this.connectionWithdraw = new WebSocket(self.withdrawUrl) - this.connectionWithdraw.onmessage = (e) => { + this.connectionWithdraw.onmessage = e => { if (e.data == 'paid') { dialog.show = false self.atmPin = null @@ -1355,6 +1352,9 @@
// active only in the the PoS mode, not in the Cart mode or ATM pin if (!this.showPoS || this.atmBox) return + // prevent weird behaviour when setting round tip + if (this.tipDialog.show) return + const {key} = event if (key >= '0' && key <= '9') { // buttons 0 ... 9