mirror of
https://github.com/lnbits/lnbits.git
synced 2025-08-03 07:22:28 +02:00
check token id
This commit is contained in:
@@ -119,7 +119,7 @@ page_container %}
|
||||
:data="invoicesCashu"
|
||||
:columns="invoicesTable.columns"
|
||||
:pagination.sync="invoicesTable.pagination"
|
||||
no-data-label="No invoices made yet"
|
||||
no-data-label="There are no invoices here yet"
|
||||
:filter="invoicesTable.filter"
|
||||
>
|
||||
{% raw %}
|
||||
@@ -140,12 +140,12 @@ page_container %}
|
||||
class="q-mr-md cursor-pointer"
|
||||
@click="recheckInvoice(props.row.hash)"
|
||||
>
|
||||
Recheck
|
||||
Check
|
||||
</q-badge>
|
||||
</div>
|
||||
<div v-if="props.row.status === 'paid'">
|
||||
<q-icon v-if="props.row.amount>0" name= "call_received" color="green"></q-icon>
|
||||
<q-icon v-if="props.row.amount<0" name= "call_made" color="red"></q-icon>
|
||||
<q-icon v-if="props.row.amount>0" name= "call_received" color="green"><q-tooltip>Received</q-tooltip></q-icon>
|
||||
<q-icon v-if="props.row.amount<0" name= "call_made" color="red"><q-tooltip>Paid</q-tooltip></q-icon>
|
||||
<!-- <q-icon name="props.row.amount < 0 ? 'call_made' : 'call_received'" color="green"></q-icon> -->
|
||||
|
||||
</div>
|
||||
|
@@ -345,6 +345,15 @@ async def split(
|
||||
status_code=HTTPStatus.NOT_FOUND, detail="Mint does not exist."
|
||||
)
|
||||
proofs = payload.proofs
|
||||
|
||||
# !!!!!!! MAKE SURE THAT PROOFS ARE ONLY FROM THIS CASHU KEYSET ID
|
||||
# THIS IS NECESSARY BECAUSE THE CASHU BACKEND WILL ACCEPT ANY VALID
|
||||
# TOKENS
|
||||
assert all([p.id == cashu.keyset_id for p in proofs]), HTTPException(
|
||||
status_code=HTTPStatus.BAD_REQUEST,
|
||||
detail="Proofs include tokens from another mint.",
|
||||
)
|
||||
|
||||
amount = payload.amount
|
||||
outputs = payload.outputs.blinded_messages
|
||||
assert outputs, Exception("no outputs provided.")
|
||||
|
Reference in New Issue
Block a user