two fixes

This commit is contained in:
user committed 2025-02-26 19:58:03 +03:00
1 parent 4e40c2f572
commit ac61ffb36a
2 files changed
+9 -9

No files matched your search

+6 -8
View File
@@ -46,7 +46,7 @@ async def s_api_v1_content_view(request, content_address: str):
opts['key_hash'] = known_key.seed_hash
opts['have_licenses'] = []
opts['invoice_url'] = None
opts['invoice'] = None
have_access = False
if request.ctx.user:
@@ -73,15 +73,13 @@ async def s_api_v1_content_view(request, content_address: str):
try:
opts['invoice'] = {
'url': (
await Bot(token=CLIENT_TELEGRAM_API_KEY).create_invodeice_link(
description='You will receive NFT with lifetime access to content',
payload=f"access_{invoice_id}",
title='Lifetime access to content',
currency='XTR',
prices=[
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"
[
types.LabeledPrice(label='Lifetime access', amount=stars_cost),
],
provider_token="",
)
),
'amount': stars_cost,