mirror of
https://github.com/lnbits/lnbits.git
synced 2026-08-13 12:42:47 +02:00
fifi
This commit is contained in:
parent
034ba44241
commit
bc7e3d4dc8
2 changed files with 5 additions and 9 deletions
|
|
@ -1,11 +1,9 @@
|
|||
from time import time
|
||||
|
||||
# TODO something is wrong about LnAddress
|
||||
from lnurl import Lnurl, LnurlPayResponse
|
||||
from lnurl import LnAddress, Lnurl, LnurlPayResponse
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
# Warning: Mixing V1 and V2 models is not supported. `LnurlPayResponse` is a V2 model.
|
||||
class CreateLnurlPayment(BaseModel):
|
||||
res: LnurlPayResponse | None = None
|
||||
lnurl: Lnurl | None = None
|
||||
|
|
@ -16,11 +14,11 @@ class CreateLnurlPayment(BaseModel):
|
|||
|
||||
|
||||
class CreateLnurlWithdraw(BaseModel):
|
||||
lnurl_w: Lnurl
|
||||
lnurl_w: Lnurl | LnAddress
|
||||
|
||||
|
||||
class LnurlScan(BaseModel):
|
||||
lnurl: Lnurl
|
||||
lnurl: Lnurl | LnAddress
|
||||
|
||||
|
||||
class StoredPayLink(BaseModel):
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ from enum import Enum
|
|||
from typing import Any, Literal
|
||||
|
||||
from fastapi import Query
|
||||
|
||||
# from lnurl import LnurlWithdrawResponse
|
||||
from lnurl import LnurlWithdrawResponse
|
||||
from loguru import logger
|
||||
from pydantic import BaseModel, Field, field_validator
|
||||
|
||||
|
|
@ -249,8 +248,7 @@ class CreateInvoice(BaseModel):
|
|||
extra: dict | None = None
|
||||
webhook: str | None = None
|
||||
bolt11: str | None = None
|
||||
# TODO: cannot mix v1 and v2
|
||||
# lnurl_withdraw: LnurlWithdrawResponse | None = None
|
||||
lnurl_withdraw: LnurlWithdrawResponse | None = None
|
||||
fiat_provider: str | None = None
|
||||
labels: list[str] = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue