remove the need for nostrclient

This commit is contained in:
callebtc 2023-04-04 12:52:10 +02:00
commit bf6659bbbd
6 changed files with 29 additions and 45 deletions

View file

@ -12,13 +12,9 @@ from .crud import increment_pay_link, get_pay_link, get_address_data
from loguru import logger
from urllib.parse import urlparse
import json
from . import nostrclient_present, nostr_publickey
from . import nostr_publickey
if nostrclient_present:
try:
from ..nostrclient.nostr.key import PrivateKey, PublicKey
except ImportError:
nostrclient_present = False
from ..nostrclient.nostr.key import PrivateKey, PublicKey
@lnurlp_ext.get(
@ -151,7 +147,6 @@ async def api_lnurl_response(request: Request, link_id, lnaddress=False):
if link.comment_chars > 0:
params["commentAllowed"] = link.comment_chars
if nostrclient_present:
params["allowsNostr"] = True
params["nostrPubkey"] = nostr_publickey.hex()
params["allowsNostr"] = True
params["nostrPubkey"] = nostr_publickey.hex()
return params