mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-28 21:02:31 +02:00
added some UI sugar, removed pending tx
This commit is contained in:
@@ -53,7 +53,13 @@ async def delete_tpos(tpos_id: str) -> None:
|
||||
async def get_tpos_payments(tpos_id: str, limit: int = 5):
|
||||
|
||||
rows = await db.fetchall(
|
||||
f"SELECT * FROM apipayments WHERE extra LIKE '%tposId%' AND extra LIKE '%{tpos_id}%' ORDER BY time DESC LIMIT {limit}"
|
||||
f"""
|
||||
SELECT * FROM apipayments
|
||||
WHERE pending = 'false'
|
||||
AND extra LIKE '%tposId%'
|
||||
AND extra LIKE '%{tpos_id}%'
|
||||
ORDER BY time DESC LIMIT {limit}
|
||||
"""
|
||||
)
|
||||
|
||||
return [Payment.from_row(row) for row in rows]
|
||||
|
@@ -275,17 +275,16 @@
|
||||
<q-item v-for="(payment, idx) in lastPaymentsDialog.data" :key="idx">
|
||||
{%raw%}
|
||||
<q-item-section>
|
||||
<q-item-label>{{payment.amount / 1000}} sats</q-item-label>
|
||||
<q-item-label class="text-bold"
|
||||
>{{payment.amount / 1000}} sats</q-item-label
|
||||
>
|
||||
<q-item-label caption lines="2"
|
||||
>{{payment.checking_id}}</q-item-label
|
||||
>Hash: {{payment.checking_id.slice(0, 30)}}...</q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
<q-item-section side top>
|
||||
<q-item-label caption>{{payment.dateFrom}}</q-item-label>
|
||||
<q-icon
|
||||
:name="payment.pending ? 'settings_ethernet' : 'check'"
|
||||
:color="payment.pending ? 'grey' : 'green'"
|
||||
/>
|
||||
<q-icon name="check" color="green" />
|
||||
</q-item-section>
|
||||
{%endraw%}
|
||||
</q-item>
|
||||
|
@@ -90,7 +90,6 @@ async def api_tpos_get_latest_invoices(tpos_id: str = None):
|
||||
"checking_id": payment.checking_id,
|
||||
"amount": payment.amount,
|
||||
"time": payment.time,
|
||||
"bolt11": payment.bolt11,
|
||||
"pending": payment.pending,
|
||||
}
|
||||
for payment in payments
|
||||
|
Reference in New Issue
Block a user