diff --git a/crud.py b/crud.py index 4fb6f82..dec6007 100644 --- a/crud.py +++ b/crud.py @@ -65,6 +65,7 @@ async def create_pay_link(data: CreatePayLinkData) -> PayLink: created_at=now, updated_at=now, disposable=data.disposable if data.disposable is not None else True, + verify=data.verify if data.verify is not None else False, ) await db.insert("lnurlp.pay_links", link) diff --git a/migrations.py b/migrations.py index 2b0e28b..da163b2 100644 --- a/migrations.py +++ b/migrations.py @@ -218,3 +218,9 @@ async def m012_add_disposable(db: Connection): await db.execute( "ALTER TABLE lnurlp.pay_links ADD COLUMN disposable BOOLEAN DEFAULT TRUE" ) + + +async def m013_add_verify(db: Connection): + await db.execute( + "ALTER TABLE lnurlp.pay_links ADD COLUMN verify BOOLEAN DEFAULT FALSE" + ) diff --git a/models.py b/models.py index d8e6d6d..f209ccb 100644 --- a/models.py +++ b/models.py @@ -35,6 +35,7 @@ class CreatePayLinkData(BaseModel): username: str | None = Query(None) zaps: bool | None = Query(False) disposable: bool | None = Query(True) + verify: bool | None = Query(False) class PayLink(BaseModel): @@ -69,6 +70,7 @@ class PayLink(BaseModel): fiat_base_multiplier: int | None = None disposable: bool + verify: bool # TODO deprecated, unused in the code, should be deleted from db. domain: str | None = None diff --git a/static/js/index.js b/static/js/index.js index 3e24281..7000bf1 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -96,6 +96,7 @@ window.app = Vue.createApp({ fixedAmount: true, data: { disposable: true, + verify: false, zaps: false } }, diff --git a/templates/lnurlp/index.html b/templates/lnurlp/index.html index a0669db..b45461c 100644 --- a/templates/lnurlp/index.html +++ b/templates/lnurlp/index.html @@ -249,6 +249,19 @@