mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 06:48:02 +01:00
format and mypy
This commit is contained in:
parent
189347ee39
commit
4e996c821e
3 changed files with 4 additions and 5 deletions
|
@ -64,9 +64,8 @@
|
|||
<code>{domain_object}</code>
|
||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||
<code
|
||||
>curl -X GET {{ request.base_url
|
||||
}}nostrnip5/api/v1/domain/{domain_id} -H "X-Api-Key:
|
||||
<invoice_key>"
|
||||
>curl -X GET {{ request.base_url }}nostrnip5/api/v1/domain/{domain_id}
|
||||
-H "X-Api-Key: <invoice_key>"
|
||||
</code>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from http import HTTPStatus
|
||||
from typing import Optional
|
||||
|
||||
from bech32 import bech32_decode, convertbits
|
||||
from fastapi import Query, Request, Response
|
||||
from fastapi.params import Depends
|
||||
from loguru import logger
|
||||
|
@ -11,7 +12,6 @@ from lnbits.core.services import create_invoice
|
|||
from lnbits.core.views.api import api_payment
|
||||
from lnbits.decorators import WalletTypeInfo, get_key_type, require_admin_key
|
||||
from lnbits.utils.exchange_rates import fiat_amount_as_satoshis
|
||||
from bech32 import bech32_decode, convertbits
|
||||
|
||||
from . import nostrnip5_ext
|
||||
from .crud import (
|
||||
|
@ -119,7 +119,6 @@ async def api_address_create(
|
|||
status_code=HTTPStatus.NOT_FOUND, detail="Local part already exists."
|
||||
)
|
||||
|
||||
|
||||
if post_data.pubkey.startswith("npub"):
|
||||
hrp, data = bech32_decode(post_data.pubkey)
|
||||
decoded_data = convertbits(data, 5, 8, False)
|
||||
|
|
|
@ -102,6 +102,7 @@ exclude = """(?x)(
|
|||
| ^lnbits/extensions/lnurldevice.
|
||||
| ^lnbits/extensions/lnurlp.
|
||||
| ^lnbits/extensions/lnurlpayout.
|
||||
| ^lnbits/extensions/nostrnip5.
|
||||
| ^lnbits/extensions/offlineshop.
|
||||
| ^lnbits/extensions/paywall.
|
||||
| ^lnbits/extensions/satspay.
|
||||
|
|
Loading…
Add table
Reference in a new issue