Skip to content

Commit

Permalink
Hotfix tip rounding (#77)
Browse files Browse the repository at this point in the history
* event listener for keys
* remove event listener when setting tip
* remove dead code
  • Loading branch information
talvasconcelos authored Apr 8, 2024
1 parent 9828808 commit 66a28c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/tpos/tpos.html
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,6 @@ <h5 class="q-mt-none q-mb-sm">
totalfsat: function () {
return LNbits.utils.formatSat(this.totalSat)
},
isRoundValid() {
return this.tipRounding > this.amount
},
roundToSugestion() {
switch (true) {
case this.amount > 50:
Expand Down Expand Up @@ -959,7 +956,7 @@ <h5 class="q-mt-none q-mb-sm">
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
Expand Down Expand Up @@ -1355,6 +1352,9 @@ <h5 class="q-mt-none q-mb-sm">
// 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
Expand Down

0 comments on commit 66a28c0

Please sign in to comment.