feat: add currency amount to lnurl/lnaddress payments

closes #2135
This commit is contained in:
dni ⚡
2024-01-22 10:23:14 -06:00
committed by Pavol Rusnak
parent 8eabf53642
commit 023a1a088e
5 changed files with 132 additions and 90 deletions
+4 -2
View File
@@ -49,14 +49,16 @@ window.LNbits = {
description_hash,
amount,
description = '',
comment = ''
comment = '',
unit = ''
) {
return this.request('post', '/api/v1/payments/lnurl', wallet.adminkey, {
callback,
description_hash,
amount,
comment,
description
description,
unit
})
},
authLnurl: function (wallet, callback) {
+6 -6
View File
@@ -113,7 +113,8 @@ new Vue({
data: {
request: '',
amount: 0,
comment: ''
comment: '',
unit: 'sat'
},
paymentChecker: null,
copy: {
@@ -286,12 +287,10 @@ new Vue({
return this.payments.findIndex(payment => payment.pending) !== -1
}
},
filters: {
methods: {
msatoshiFormat: function (value) {
return LNbits.utils.formatSat(value / 1000)
}
},
methods: {
},
paymentTableRowKey: function (row) {
return row.payment_hash + row.amount
},
@@ -639,7 +638,8 @@ new Vue({
this.parse.lnurlpay.description_hash,
this.parse.data.amount * 1000,
this.parse.lnurlpay.description.slice(0, 120),
this.parse.data.comment
this.parse.data.comment,
this.parse.data.unit
)
.then(response => {
this.parse.show = false