dev@locazia: add "confirm tx" message

This commit is contained in:
user committed 2024-03-08 22:58:48 +03:00
1 parent b80e070b4d
commit 836adaf7b2
6 files changed
+113 -29

No files matched your search

+37
View File
@@ -13,6 +13,40 @@ from app.core.models.wallet_connection import WalletConnection
TON_CONNECT_MANIFEST_URI = os.getenv("TON_CONNECT_MANIFEST_URI")
TON_CONNECT_WALLETS_LIST = [
{
'about_url': 'https://wallet.tg/',
'app_name': 'telegram-wallet',
'bridge_url': 'https://bridge.tonapi.io/bridge',
'image': 'https://wallet.tg/images/logo-288.png',
'name': 'Wallet',
'universal_url': 'https://t.me/wallet?attach=wallet&startattach=tonconnect'
},
{
'about_url': 'https://tonkeeper.com',
'app_name': 'tonkeeper',
'bridge_url': 'https://bridge.tonapi.io/bridge',
'image': 'https://tonkeeper.com/assets/tonconnect-icon.png',
'name': 'Tonkeeper',
'universal_url': 'https://app.tonkeeper.com/ton-connect'},
{
'about_url': 'https://mytonwallet.io',
'app_name': 'mytonwallet',
'bridge_url': 'https://tonconnectbridge.mytonwallet.org/bridge/',
'image': 'https://mytonwallet.io/icon-256.png',
'name': 'MyTonWallet',
'universal_url': 'https://connect.mytonwallet.org'
},
{
'about_url': 'https://tonhub.com',
'app_name': 'tonhub',
'bridge_url': 'https://connect.tonhubapi.com/tonconnect',
'image': 'https://tonhub.com/tonconnect_logo.png',
'name': 'Tonhub',
'universal_url': 'https://tonhub.com/ton-connect'
}
]
def unpack_wallet_info(wallet_info) -> dict:
return {
@@ -65,6 +99,9 @@ class TonConnect:
if wallet["app_name"] == app_name:
return await self._sdk_client.connect(wallet)
async def raw_new_connection(self, app_startup: dict):
return await self._sdk_client.connect(app_startup)
async def restore_connection(self):
return await self._sdk_client.restore_connection()
+2 -1
View File
@@ -111,7 +111,8 @@ async def indexer_loop(platform_found: bool, seqno: int) -> [bool, int]:
).first()
encrypted_stored_content = session.query(StoredContent).filter(
StoredContent.hash == item_content_hash_str
StoredContent.hash == item_content_hash_str,
StoredContent.type.like("local%")
).first()
if encrypted_stored_content:
encrypted_stored_content_meta = encrypted_stored_content.meta
+7
View File
@@ -49,6 +49,13 @@ class StoredContent(AlchemyBase):
accept_type=self.meta.get('content_type', 'image/jpeg')
)
@property
def decrypt_possible(self) -> bool:
if self.encrypted is False:
return True
return bool(self.key_id or self.decrypted_content_id)
def json_format(self):
extra_fields = {}
if self.btfs_cid: