Compare commits
1 commit
51a5adf540
...
d8cdc1e680
| Author | SHA1 | Date | |
|---|---|---|---|
| d8cdc1e680 |
3 changed files with 7 additions and 8 deletions
2
lnbits/static/bundle-components.min.js
vendored
2
lnbits/static/bundle-components.min.js
vendored
File diff suppressed because one or more lines are too long
2
lnbits/static/bundle.min.js
vendored
2
lnbits/static/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -308,17 +308,16 @@ window.PageWallet = {
|
|||
}
|
||||
|
||||
// Check if invoice is amountless (no amount specified)
|
||||
// The decoder returns 'Any amount' string for amountless invoices
|
||||
const invoiceAmount = invoice.human_readable_part.amount
|
||||
const isAmountless =
|
||||
typeof invoiceAmount !== 'number' || invoiceAmount <= 0
|
||||
!invoice.human_readable_part.amount ||
|
||||
invoice.human_readable_part.amount === 0
|
||||
|
||||
let cleanInvoice = {
|
||||
msat: isAmountless ? null : invoiceAmount,
|
||||
sat: isAmountless ? null : invoiceAmount / 1000,
|
||||
msat: isAmountless ? null : invoice.human_readable_part.amount,
|
||||
sat: isAmountless ? null : invoice.human_readable_part.amount / 1000,
|
||||
fsat: isAmountless
|
||||
? this.$t('any_amount')
|
||||
: LNbits.utils.formatSat(invoiceAmount / 1000),
|
||||
: LNbits.utils.formatSat(invoice.human_readable_part.amount / 1000),
|
||||
bolt11: this.parse.data.request,
|
||||
isAmountless: isAmountless
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue