diff --git a/tgbot/routers/admin/admin_payments.py b/tgbot/routers/admin/admin_payments.py
index 5e2b2e7..8097551 100644
--- a/tgbot/routers/admin/admin_payments.py
+++ b/tgbot/routers/admin/admin_payments.py
@@ -320,7 +320,7 @@ async def payments_lolzteam_merchant_id_get(
).check()
if status:
- await Paymentsx().update(lolzteam_merchant_id=get_merchant_id)
+ await Paymentsx().update(lolzteam_merchant_id=int(get_merchant_id))
await cache_message.edit_text("🟢 Lolzteam был успешно изменён ✅")
else:
await cache_message.edit_text("🟢 Не удалось изменить Lolzteam ❌")
diff --git a/tgbot/services/api_lolzteam.py b/tgbot/services/api_lolzteam.py
index c24efe8..5aa3bb7 100644
--- a/tgbot/services/api_lolzteam.py
+++ b/tgbot/services/api_lolzteam.py
@@ -104,7 +104,12 @@ class LolzteamAPI:
status, response = await self._request("me", method="GET")
merchant_valid = False
- if status and "errors" not in response and self.merchant_id:
+ if (
+ status
+ and "errors" not in response
+ and "balances" in response["user"]
+ and self.merchant_id
+ ):
balances = response["user"]["balances"]
for balance in balances:
@@ -125,7 +130,7 @@ class LolzteamAPI:
elif status and "errors" not in response and not self.merchant_id:
return True, ded(
f"""
- 🟢 Lolzteam полностью функционирует ✅
+ 🟢 Lolzteam функционирует ✅
➖➖➖➖➖➖➖➖➖➖
▪️ Токен: {self.token}
▪️ Айди: {response['user']['user_id']}