mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-13 11:52:45 +02:00
fix: add-invoice crash and update docs
A required field was not set and for some reason prior Pydantic versions didn't notice at all. closes #150
This commit is contained in:
parent
4408a6a58c
commit
a4e9f7bf23
2 changed files with 7 additions and 1 deletions
|
|
@ -421,6 +421,7 @@ async def add_invoice_impl(
|
|||
# Can't use Invoice.from_lnd_grpc() here because
|
||||
# the response is not a standard invoice
|
||||
invoice = Invoice(
|
||||
value_msat=value_msat,
|
||||
memo=memo,
|
||||
expiry=expiry,
|
||||
r_hash=response.r_hash.hex(),
|
||||
|
|
|
|||
|
|
@ -69,7 +69,12 @@ responses = {
|
|||
responses=responses,
|
||||
)
|
||||
async def addinvoice(
|
||||
value_msat: int, memo: str = "", expiry: int = 3600, is_keysend: bool = False
|
||||
value_msat: int = Query(description="The amount of msat of the invoice", ge=0),
|
||||
memo: str = Query("", description="The memo of the invoice"),
|
||||
expiry: int = Query(3600, description="Expiry time in seconds"),
|
||||
is_keysend: bool = Query(
|
||||
False, description="LND only: Whether this invoice is a keysend invoice."
|
||||
),
|
||||
):
|
||||
try:
|
||||
return await add_invoice(memo, value_msat, expiry, is_keysend)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue