fix: if sats and fiat checkout conversion currency

This commit is contained in:
Arc 2026-05-07 14:34:22 +01:00
commit 32c230957e
7 changed files with 59 additions and 16 deletions

View file

@ -41,8 +41,16 @@ window.PageEventsDisplay = {
return LNbits.utils.convertMarkdown(this.event?.info || '')
},
allowFiatCheckout() {
const currency = (this.event?.currency || '').toLowerCase()
return this.event?.allow_fiat && !['sat', 'sats'].includes(currency)
return Boolean(this.event?.allow_fiat)
},
fiatCheckoutLabel() {
if (!this.allowFiatCheckout) return 'Fiat'
const unit = ['sat', 'sats'].includes(
(this.event?.currency || '').toLowerCase()
)
? this.event?.fiat_currency
: this.event?.currency
return `Fiat (${(unit || 'GBP').toUpperCase()})`
},
allowEmailNotifications() {
return Boolean(this.event?.extra?.email_notifications)