Get token by ID
(self, token_id: int)
| 960 | return token_id |
| 961 | |
| 962 | async def get_token(self, token_id: int) -> Optional[Token]: |
| 963 | """Get token by ID""" |
| 964 | async with self._connect() as db: |
| 965 | db.row_factory = aiosqlite.Row |
| 966 | cursor = await db.execute("SELECT * FROM tokens WHERE id = ?", (token_id,)) |
| 967 | row = await cursor.fetchone() |
| 968 | if row: |
| 969 | return Token(**dict(row)) |
| 970 | return None |
| 971 | |
| 972 | async def get_token_by_st(self, st: str) -> Optional[Token]: |
| 973 | """Get token by ST""" |
no test coverage detected