bug: When "expiry" is null, do not display "expiry" in payment details (#2349)

* Do not display expiry in payment details, when expiry is null
This commit is contained in:
Gonçalo Valério 2024-03-26 09:46:30 +00:00 committed by GitHub
parent 0ef9c4db10
commit 86821f4606
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -238,7 +238,7 @@ Vue.component('lnbits-payment-details', {
{{ payment.date }} ({{ payment.dateFrom }}) {{ payment.date }} ({{ payment.dateFrom }})
</div> </div>
<div class="row"> <div class="row" v-if="hasExpiry">
<b v-text="$t('expiry')"></b>: <b v-text="$t('expiry')"></b>:
{{ payment.expirydate }} ({{ payment.expirydateFrom }}) {{ payment.expirydate }} ({{ payment.expirydateFrom }})
</div> </div>
@ -298,6 +298,9 @@ Vue.component('lnbits-payment-details', {
'0000000000000000000000000000000000000000000000000000000000000000' '0000000000000000000000000000000000000000000000000000000000000000'
) )
}, },
hasExpiry() {
return !!this.payment.expiry
},
hasSuccessAction() { hasSuccessAction() {
return ( return (
this.hasPreimage && this.hasPreimage &&