More notes and black
This commit is contained in:
parent
2c3d7a78ea
commit
c50aaf5d8c
4 changed files with 7 additions and 7 deletions
1
lnurl.py
1
lnurl.py
|
|
@ -86,6 +86,7 @@ async def api_lnurl_pay_cb(
|
||||||
## here and crud.py will allow muliple pulls ####
|
## here and crud.py will allow muliple pulls ####
|
||||||
#################################################
|
#################################################
|
||||||
|
|
||||||
|
|
||||||
@myextension_ext.get(
|
@myextension_ext.get(
|
||||||
"/api/v1/lnurl/withdraw/{myextension_id}/{tickerhash}",
|
"/api/v1/lnurl/withdraw/{myextension_id}/{tickerhash}",
|
||||||
status_code=HTTPStatus.OK,
|
status_code=HTTPStatus.OK,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# The migration file is like a blockchain, never edit only add!
|
# the migration file is where you build your database tables
|
||||||
|
# If you create a new release for your extension , remeember the migration file is like a blockchain, never edit only add!
|
||||||
|
|
||||||
|
|
||||||
async def m001_initial(db):
|
async def m001_initial(db):
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
# Models for retrieving data from the database
|
# Data models for your extension
|
||||||
# Includes some classmethods where we can add some logic to the data
|
|
||||||
|
|
||||||
from sqlite3 import Row
|
from sqlite3 import Row
|
||||||
from typing import Optional, List
|
from typing import Optional, List
|
||||||
|
|
|
||||||
7
tasks.py
7
tasks.py
|
|
@ -11,11 +11,10 @@ from .crud import get_myextension, update_myextension
|
||||||
|
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
########## RUN YOUR TASKS HERE #########
|
########## RUN YOUR TASKS HERE ########
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
|
# The usual task is to listen to invoices related to this extension
|
||||||
# the usual task is to listen to invoices related to this extension
|
|
||||||
|
|
||||||
|
|
||||||
async def wait_for_paid_invoices():
|
async def wait_for_paid_invoices():
|
||||||
|
|
@ -27,7 +26,7 @@ async def wait_for_paid_invoices():
|
||||||
await on_invoice_paid(payment)
|
await on_invoice_paid(payment)
|
||||||
|
|
||||||
|
|
||||||
# do somethhing when an invoice related top this extension is paid
|
# Do somethhing when an invoice related top this extension is paid
|
||||||
|
|
||||||
|
|
||||||
async def on_invoice_paid(payment: Payment) -> None:
|
async def on_invoice_paid(payment: Payment) -> None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue