dev@locazia: fixes

This commit is contained in:
user 2024-03-08 10:25:56 +03:00
parent e947a99ff5
commit b59dd47e2d
3 changed files with 10 additions and 3 deletions

View File

@ -10,8 +10,11 @@ async def s_api_v1_content_list(request):
assert 0 <= offset, "Invalid offset" assert 0 <= offset, "Invalid offset"
assert 0 < limit <= 1000, "Invalid limit" assert 0 < limit <= 1000, "Invalid limit"
store = request.args.get('store', 'local')
assert store in ('local', 'onchain'), "Invalid store"
content_list = request.ctx.db_session.query(StoredContent).filter( content_list = request.ctx.db_session.query(StoredContent).filter(
StoredContent.type == 'local/content_bin' StoredContent.type.like(store + '%')
).order_by(StoredContent.created.desc()).offset(offset).limit(limit) ).order_by(StoredContent.created.desc()).offset(offset).limit(limit)
make_log("Content", f"Listed {content_list.count()} contents", level='info') make_log("Content", f"Listed {content_list.count()} contents", level='info')
result = {} result = {}

View File

@ -83,8 +83,12 @@ async def t_callback_init_tonconnect(query: types.CallbackQuery, memory=None, us
keyboard=get_inline_keyboard([ keyboard=get_inline_keyboard([
[ [
{ {
'text': 'Connect', 'text': user.translated('tonconnectOpenWallet_button'),
'url': connection_link 'url': connection_link
},
{
'text': user.translated('home_button'),
'callback_data': 'home'
} }
] ]
]), message_id=query.message.message_id ]), message_id=query.message.message_id

View File

@ -68,7 +68,7 @@ async def indexer_loop(platform_found: bool, seqno: int) -> [bool, int]:
item_license_type = int(item_get_data_result['stack'][4][1], 16) item_license_type = int(item_get_data_result['stack'][4][1], 16)
assert item_license_type == 0, "Item license type is not 0" assert item_license_type == 0, "Item license type is not 0"
item_owner_address = Cell.one_from_boc(b64decode(item_get_data_result['stack'][5][1])).begin_parse().read_msg_addr() item_owner_address = Cell.one_from_boc(b64decode(item_get_data_result['stack'][5][1])["bytes"]).begin_parse().read_msg_addr()
item_values = Cell.one_from_boc(b64decode(item_get_data_result['stack'][6][1]['bytes'])) item_values = Cell.one_from_boc(b64decode(item_get_data_result['stack'][6][1]['bytes']))
item_derivates = Cell.one_from_boc(b64decode(item_get_data_result['stack'][7][1]['bytes'])) item_derivates = Cell.one_from_boc(b64decode(item_get_data_result['stack'][7][1]['bytes']))
item_platform_variables = Cell.one_from_boc(b64decode(item_get_data_result['stack'][8][1]['bytes'])) item_platform_variables = Cell.one_from_boc(b64decode(item_get_data_result['stack'][8][1]['bytes']))