Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
  • Loading branch information
dni committed Oct 11, 2024
1 parent fa6f162 commit 1d8bee5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions static/js/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ window.app = Vue.createApp({
},
computed: {
formatDescription() {
console.log(this.info)
debugger
return LNbits.utils.convertMarkdown(this.info)
}
},
Expand Down
4 changes: 2 additions & 2 deletions static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const mapEvents = function (obj) {
new Date(obj.time * 1000),
'YYYY-MM-DD HH:mm'
)
obj.fsat = new Intl.NumberFormat(LOCALE).format(obj.amount)
obj.fsat = new Intl.NumberFormat(LOCALE).format(obj.price_per_ticket)
obj.displayUrl = ['/events/', obj.id].join('')
return obj
}
Expand Down Expand Up @@ -45,7 +45,7 @@ window.app = Vue.createApp({
align: 'left',
label: 'Price',
field: row => {
if (row.currency != 'sat') {
if (row.currency != 'sats') {
return LNbits.utils.formatCurrency(
row.price_per_ticket.toFixed(2),
row.currency
Expand Down
2 changes: 1 addition & 1 deletion templates/events/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h5 class="q-my-none">{{ event_error }}</h5>
<script>
window.app = Vue.createApp({
el: '#vue',
mixins: [windowMixin],
mixins: [windowMixin]
})
</script>

Expand Down
4 changes: 2 additions & 2 deletions templates/events/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ <h6 class="text-subtitle1 q-my-none">
v-model.number="formDialog.data.price_per_ticket"
type="number"
:label="'Price (' + formDialog.data.currency + ') *'"
:step="formDialog.data.currency != 'sat' ? '0.01' : '1'"
:mask="formDialog.data.currency != 'sat' ? '#.##' : '#'"
:step="formDialog.data.currency != 'sats' ? '0.01' : '1'"
:mask="formDialog.data.currency != 'sats' ? '#.##' : '#'"
fill-mask="0"
reverse-fill-mask
></q-input>
Expand Down
4 changes: 2 additions & 2 deletions views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async def api_ticket_make_ticket(event_id, name, email):
price = event.price_per_ticket
extra = {"tag": "events", "name": name, "email": email}

if event.currency != "sat":
if event.currency != "sats":
price = await fiat_amount_as_satoshis(event.price_per_ticket, event.currency)

extra["fiat"] = True
Expand Down Expand Up @@ -179,7 +179,7 @@ async def api_ticket_send_ticket(event_id, payment_hash):
assert payment
price = (
event.price_per_ticket * 1000
if event.currency == "sat"
if event.currency == "sats"
else await fiat_amount_as_satoshis(event.price_per_ticket, event.currency)
* 1000
)
Expand Down

0 comments on commit 1d8bee5

Please sign in to comment.