mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-13 11:35:56 +01:00
fix older tpos without tips (#778)
This commit is contained in:
parent
7fbea79e62
commit
27b4db9877
1 changed files with 10 additions and 3 deletions
|
@ -169,7 +169,9 @@
|
|||
<h5 class="q-mt-none">
|
||||
{% raw %}{{ fsat }}
|
||||
<small>sat</small>
|
||||
<span style="font-size: 0.75rem">( + {{ tipAmountSat }} tip)</span>
|
||||
<span v-show="tip_options" style="font-size: 0.75rem"
|
||||
>( + {{ tipAmountSat }} tip)</span
|
||||
>
|
||||
{% endraw %}
|
||||
</h5>
|
||||
</div>
|
||||
|
@ -275,7 +277,7 @@
|
|||
return {
|
||||
tposId: '{{ tpos.id }}',
|
||||
currency: '{{ tpos.currency }}',
|
||||
tip_options: JSON.parse('{{ tpos.tip_options }}'),
|
||||
tip_options: null,
|
||||
exchangeRate: null,
|
||||
stack: [],
|
||||
tipAmount: 0.0,
|
||||
|
@ -352,7 +354,7 @@
|
|||
this.showInvoice()
|
||||
},
|
||||
submitForm: function () {
|
||||
if (this.tip_options.length) {
|
||||
if (this.tip_options) {
|
||||
this.showTipModal()
|
||||
} else {
|
||||
this.showInvoice()
|
||||
|
@ -417,6 +419,11 @@
|
|||
created: function () {
|
||||
var getRates = this.getRates
|
||||
getRates()
|
||||
this.tip_options =
|
||||
'{{ tpos.tip_options | tojson }}' == 'null'
|
||||
? null
|
||||
: JSON.parse('{{ tpos.tip_options }}')
|
||||
console.log(typeof this.tip_options, this.tip_options)
|
||||
setInterval(function () {
|
||||
getRates()
|
||||
}, 20000)
|
||||
|
|
Loading…
Add table
Reference in a new issue