chore: here and there

This commit is contained in:
Vlad Stan
2022-10-10 14:22:00 +03:00
parent 07eea85677
commit 7f20755c5a

View File

@@ -94,6 +94,12 @@ page_container %}
Recheck
</q-badge>
</div>
<div v-if="props.row.status === 'paid'">
<q-icon
name="call_received"
color="green"
>
</div>
</q-td>
<q-td
key="amount"
@@ -844,7 +850,7 @@ page_container %}
},
showInvoiceDialog: async function (data) {
this.buyData = data
this.buyData = _.clone(data)
this.showInvoiceDetails = true
},
@@ -859,7 +865,7 @@ page_container %}
this.buyData.bolt11 = data.pr
this.buyData.hash = data.hash
this.buyOrders.push({
...this.buyData,
..._.clone(this.buyData),
date: currentDateStr(),
status: 'pending'
})
@@ -894,8 +900,9 @@ page_container %}
},
recheckBuyOrder: async function (hash) {
console.log('### recheckBuyOrder', hash)
const tokens = this.tokens.find(bt => (bt.hash = hash))
console.log('### recheckBuyOrder.hash', hash)
const tokens = this.tokens.find(bt => (bt.hash === hash))
console.log('### recheckBuyOrder.tokens', tokens)
if (!tokens) {
console.error('####### no token for hash', hash)
return
@@ -906,6 +913,12 @@ page_container %}
)
if (promises && promises.length) {
tokens.promises = promises
tokens.status = 'paid'
this.storeTokens()
const buyOrder = this.buyOrders.find(bo => bo.hash === hash)
buyOrder.status = 'paid'
this.storeBuyOrders()
}
},
@@ -1043,7 +1056,8 @@ page_container %}
localStorage.getItem('cashu.buyOrders') || '[]'
)
this.tokens = JSON.parse(localStorage.getItem('cashu.tokens') || '[]')
console.log('#### this.buyOrders', this.buyOrders)
console.table(this.buyOrders)
console.table(this.tokens)
console.log('#### this.mintId', this.mintId)
console.log('#### this.mintName', this.mintName)