use {"tag": ext} for extension-related payments.

This commit is contained in:
fiatjaf
2020-09-02 12:44:54 -03:00
parent 4447a48724
commit 197af922d0
14 changed files with 100 additions and 39 deletions
+12 -6
View File
@@ -1,4 +1,4 @@
/* globals Vue, VueQrcodeReader, VueQrcode, Quasar, LNbits, _ */
/* globals decode, Vue, VueQrcodeReader, VueQrcode, Quasar, LNbits, _, EventHub, Chart */
Vue.component(VueQrcode.name, VueQrcode)
Vue.use(VueQrcodeReader)
@@ -123,6 +123,7 @@ new Vue({
mixins: [windowMixin],
data: function() {
return {
user: LNbits.map.user(window.user),
receive: {
show: false,
status: 'pending',
@@ -146,7 +147,12 @@ new Vue({
payments: [],
paymentsTable: {
columns: [
{name: 'memo', align: 'left', label: 'Memo', field: 'memo'},
{
name: 'memo',
align: 'left',
label: 'Memo',
field: 'memo'
},
{
name: 'date',
align: 'left',
@@ -179,7 +185,7 @@ new Vue({
computed: {
filteredPayments: function() {
var q = this.paymentsTable.filter
if (!q || q == '') return this.payments
if (!q || q === '') return this.payments
return LNbits.utils.search(this.payments, q)
},
@@ -316,11 +322,11 @@ new Vue({
_.each(invoice.data.tags, function(tag) {
if (_.isObject(tag) && _.has(tag, 'description')) {
if (tag.description == 'payment_hash') {
if (tag.description === 'payment_hash') {
cleanInvoice.hash = tag.value
} else if (tag.description == 'description') {
} else if (tag.description === 'description') {
cleanInvoice.description = tag.value
} else if (tag.description == 'expiry') {
} else if (tag.description === 'expiry') {
var expireDate = new Date(
(invoice.data.time_stamp + tag.value) * 1000
)