Skip to content

Commit 66a28c0

Browse files
Hotfix tip rounding (#77)
* event listener for keys * remove event listener when setting tip * remove dead code
1 parent 9828808 commit 66a28c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/tpos/tpos.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -808,9 +808,6 @@ <h5 class="q-mt-none q-mb-sm">
808808
totalfsat: function () {
809809
return LNbits.utils.formatSat(this.totalSat)
810810
},
811-
isRoundValid() {
812-
return this.tipRounding > this.amount
813-
},
814811
roundToSugestion() {
815812
switch (true) {
816813
case this.amount > 50:
@@ -959,7 +956,7 @@ <h5 class="q-mt-none q-mb-sm">
959956
self.atmToken
960957
}
961958
this.connectionWithdraw = new WebSocket(self.withdrawUrl)
962-
this.connectionWithdraw.onmessage = (e) => {
959+
this.connectionWithdraw.onmessage = e => {
963960
if (e.data == 'paid') {
964961
dialog.show = false
965962
self.atmPin = null
@@ -1355,6 +1352,9 @@ <h5 class="q-mt-none q-mb-sm">
13551352
// active only in the the PoS mode, not in the Cart mode or ATM pin
13561353
if (!this.showPoS || this.atmBox) return
13571354

1355+
// prevent weird behaviour when setting round tip
1356+
if (this.tipDialog.show) return
1357+
13581358
const {key} = event
13591359
if (key >= '0' && key <= '9') {
13601360
// buttons 0 ... 9

0 commit comments

Comments
 (0)