This commit is contained in:
user 2025-02-26 20:21:45 +03:00
parent 7e39d8db61
commit b322c63bec
2 changed files with 7 additions and 6 deletions

View File

@ -75,7 +75,7 @@ async def s_api_v1_content_view(request, content_address: str):
invoice_url = await Bot(token=CLIENT_TELEGRAM_API_KEY).create_invoice_link(
'Lifetime access to content',
'You will receive NFT with lifetime access to content',
f"access_{invoice_id}", "", "XTR",
invoice_id, "", "XTR",
[
types.LabeledPrice(label='Lifetime access', amount=stars_cost),
],
@ -94,10 +94,11 @@ async def s_api_v1_content_view(request, content_address: str):
except BaseException as e:
make_log("Content", f"Can't create invoice link: {e}", level='warning')
opts['invoice'] = {
'url': invoice_url,
'amount': stars_cost,
}
if invoice_url:
opts['invoice'] = {
'url': invoice_url,
'amount': stars_cost,
}
display_options = {
'content_url': content['decrypted_content'].web_url + (

View File

@ -119,7 +119,7 @@ async def convert_loop():
file_hash = hash_stdout.decode().split()[0]
file_hash = b58encode(bytes.fromhex(file_hash)).decode()
if not db_session.query(StoredContent).filter(
if not session.query(StoredContent).filter(
StoredContent.hash == file_hash
).first():
new_content = StoredContent(