mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-10 04:22:35 +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):
|
async def get_tpos_payments(tpos_id: str, limit: int = 5):
|
||||||
|
|
||||||
rows = await db.fetchall(
|
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]
|
return [Payment.from_row(row) for row in rows]
|
||||||
|
@@ -275,17 +275,16 @@
|
|||||||
<q-item v-for="(payment, idx) in lastPaymentsDialog.data" :key="idx">
|
<q-item v-for="(payment, idx) in lastPaymentsDialog.data" :key="idx">
|
||||||
{%raw%}
|
{%raw%}
|
||||||
<q-item-section>
|
<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"
|
<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>
|
||||||
<q-item-section side top>
|
<q-item-section side top>
|
||||||
<q-item-label caption>{{payment.dateFrom}}</q-item-label>
|
<q-item-label caption>{{payment.dateFrom}}</q-item-label>
|
||||||
<q-icon
|
<q-icon name="check" color="green" />
|
||||||
:name="payment.pending ? 'settings_ethernet' : 'check'"
|
|
||||||
:color="payment.pending ? 'grey' : 'green'"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
{%endraw%}
|
{%endraw%}
|
||||||
</q-item>
|
</q-item>
|
||||||
|
@@ -90,7 +90,6 @@ async def api_tpos_get_latest_invoices(tpos_id: str = None):
|
|||||||
"checking_id": payment.checking_id,
|
"checking_id": payment.checking_id,
|
||||||
"amount": payment.amount,
|
"amount": payment.amount,
|
||||||
"time": payment.time,
|
"time": payment.time,
|
||||||
"bolt11": payment.bolt11,
|
|
||||||
"pending": payment.pending,
|
"pending": payment.pending,
|
||||||
}
|
}
|
||||||
for payment in payments
|
for payment in payments
|
||||||
|
Reference in New Issue
Block a user