allow invoices to be generated using Fiat values

This commit is contained in:
Tiago vasconcelos
2021-06-14 11:13:49 -03:00
committed by fiatjaf
parent cfbd6fca3a
commit d91dbbcac3
4 changed files with 46 additions and 3 deletions
+8 -1
View File
@@ -14,11 +14,18 @@ window.LNbits = {
data: data
})
},
createInvoice: function (wallet, amount, memo, lnurlCallback = null) {
createInvoice: async function (
wallet,
amount,
memo,
unit = 'sat',
lnurlCallback = null
) {
return this.request('post', '/api/v1/payments', wallet.inkey, {
out: false,
amount: amount,
memo: memo,
unit: unit,
lnurl_callback: lnurlCallback
})
},