fix: payment list updates (#2493)
* fix: payment list updates --------- Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
Vue.component('payment-list', {
|
||||
name: 'payment-list',
|
||||
props: ['wallet', 'mobileSimple', 'lazy'],
|
||||
props: ['update', 'wallet', 'mobileSimple', 'lazy'],
|
||||
data: function () {
|
||||
return {
|
||||
denomination: LNBITS_DENOMINATION,
|
||||
@@ -163,12 +163,22 @@ Vue.component('payment-list', {
|
||||
this.wallet.name + '-payments'
|
||||
)
|
||||
})
|
||||
},
|
||||
formatCurrency: function (currency, amount) {
|
||||
try {
|
||||
return LNbits.utils.formatCurrency(currency, amount)
|
||||
} catch (error) {
|
||||
console.warn(error)
|
||||
return `${amount} ???`
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
lazy: function (newVal) {
|
||||
debugger
|
||||
if (newVal === true) this.fetchPayments()
|
||||
},
|
||||
update: function () {
|
||||
this.fetchPayments()
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
@@ -294,13 +304,13 @@ Vue.component('payment-list', {
|
||||
<br />
|
||||
<i v-if="props.row.extra.wallet_fiat_currency">
|
||||
<span
|
||||
v-text="LNbits.utils.formatCurrency(props.row.extra.wallet_fiat_currency, props.row.extra.wallet_fiat_amount)"
|
||||
v-text="formatCurrency(props.row.extra.wallet_fiat_currency, props.row.extra.wallet_fiat_amount)"
|
||||
></span>
|
||||
<br />
|
||||
</i>
|
||||
<i v-if="props.row.extra.fiat_currency">
|
||||
<span
|
||||
v-text="LNbits.utils.formatCurrency(props.row.extra.fiat_currency, props.row.extra.fiat_amount)"
|
||||
v-text="formatCurrency(props.row.extra.fiat_currency, props.row.extra.fiat_amount)"
|
||||
></span>
|
||||
</i>
|
||||
</q-td>
|
||||
|
||||
Reference in New Issue
Block a user