Skip to content

Commit

Permalink
fix: tasks use payment_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
dni committed Jan 2, 2025
1 parent 512055e commit 8c88be1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
if payment.extra.get("tag") == "pay2print":
logger.info("pay2print extension received payment")
print_id = payment.extra.get("print_id")
assert print_id, "Print ID not found."
_print = await get_print(print_id)
_print = await get_print(payment.payment_hash)
assert _print, "Print not found."
printer = await get_printer(_print.printer)
assert printer, "Printer not found."
Expand Down
3 changes: 2 additions & 1 deletion templates/pay2print/photo.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ <h2 class="text-h5">
autoplay
style="display: none"
></video>
<p class="text-center" v-text="webcamError"></p>
<h3 v-if="!webcam" class="text-h6 text-center">Device does not support camera!</h3>
<p class="text-center text-negative" v-text="webcamError"></p>
<canvas ref="canvas" width="0" height="0"></canvas>
<q-card-section
v-if="invoice != null && paid == false"
Expand Down

0 comments on commit 8c88be1

Please sign in to comment.