fixes
This commit is contained in:
parent
7e39d8db61
commit
b322c63bec
|
|
@ -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(
|
invoice_url = await Bot(token=CLIENT_TELEGRAM_API_KEY).create_invoice_link(
|
||||||
'Lifetime access to content',
|
'Lifetime access to content',
|
||||||
'You will receive NFT with 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),
|
types.LabeledPrice(label='Lifetime access', amount=stars_cost),
|
||||||
],
|
],
|
||||||
|
|
@ -94,6 +94,7 @@ async def s_api_v1_content_view(request, content_address: str):
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
make_log("Content", f"Can't create invoice link: {e}", level='warning')
|
make_log("Content", f"Can't create invoice link: {e}", level='warning')
|
||||||
|
|
||||||
|
if invoice_url:
|
||||||
opts['invoice'] = {
|
opts['invoice'] = {
|
||||||
'url': invoice_url,
|
'url': invoice_url,
|
||||||
'amount': stars_cost,
|
'amount': stars_cost,
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ async def convert_loop():
|
||||||
file_hash = hash_stdout.decode().split()[0]
|
file_hash = hash_stdout.decode().split()[0]
|
||||||
file_hash = b58encode(bytes.fromhex(file_hash)).decode()
|
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
|
StoredContent.hash == file_hash
|
||||||
).first():
|
).first():
|
||||||
new_content = StoredContent(
|
new_content = StoredContent(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue