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>
|
<code>{domain_object}</code>
|
||||||
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
<h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
|
||||||
<code
|
<code
|
||||||
>curl -X GET {{ request.base_url
|
>curl -X GET {{ request.base_url }}nostrnip5/api/v1/domain/{domain_id}
|
||||||
}}nostrnip5/api/v1/domain/{domain_id} -H "X-Api-Key:
|
-H "X-Api-Key: <invoice_key>"
|
||||||
<invoice_key>"
|
|
||||||
</code>
|
</code>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from bech32 import bech32_decode, convertbits
|
||||||
from fastapi import Query, Request, Response
|
from fastapi import Query, Request, Response
|
||||||
from fastapi.params import Depends
|
from fastapi.params import Depends
|
||||||
from loguru import logger
|
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.core.views.api import api_payment
|
||||||
from lnbits.decorators import WalletTypeInfo, get_key_type, require_admin_key
|
from lnbits.decorators import WalletTypeInfo, get_key_type, require_admin_key
|
||||||
from lnbits.utils.exchange_rates import fiat_amount_as_satoshis
|
from lnbits.utils.exchange_rates import fiat_amount_as_satoshis
|
||||||
from bech32 import bech32_decode, convertbits
|
|
||||||
|
|
||||||
from . import nostrnip5_ext
|
from . import nostrnip5_ext
|
||||||
from .crud import (
|
from .crud import (
|
||||||
|
|
@ -119,7 +119,6 @@ async def api_address_create(
|
||||||
status_code=HTTPStatus.NOT_FOUND, detail="Local part already exists."
|
status_code=HTTPStatus.NOT_FOUND, detail="Local part already exists."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if post_data.pubkey.startswith("npub"):
|
if post_data.pubkey.startswith("npub"):
|
||||||
hrp, data = bech32_decode(post_data.pubkey)
|
hrp, data = bech32_decode(post_data.pubkey)
|
||||||
decoded_data = convertbits(data, 5, 8, False)
|
decoded_data = convertbits(data, 5, 8, False)
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ exclude = """(?x)(
|
||||||
| ^lnbits/extensions/lnurldevice.
|
| ^lnbits/extensions/lnurldevice.
|
||||||
| ^lnbits/extensions/lnurlp.
|
| ^lnbits/extensions/lnurlp.
|
||||||
| ^lnbits/extensions/lnurlpayout.
|
| ^lnbits/extensions/lnurlpayout.
|
||||||
|
| ^lnbits/extensions/nostrnip5.
|
||||||
| ^lnbits/extensions/offlineshop.
|
| ^lnbits/extensions/offlineshop.
|
||||||
| ^lnbits/extensions/paywall.
|
| ^lnbits/extensions/paywall.
|
||||||
| ^lnbits/extensions/satspay.
|
| ^lnbits/extensions/satspay.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue