mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
01a5befd87
- Removed wallet transaction and transfer logic from the wallet domain. - Introduced a new tonapi module to handle transactions and balance checks. - Updated tests to reflect the new structure and ensure functionality remains intact. - Added functionality for sending TON and USDT transfers through the tonapi module. - Improved error handling and validation for payment balances. - Cleaned up and organized imports across the codebase.
20 lines
699 B
Python
20 lines
699 B
Python
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from pyfragment.domains.ads.recharge import recharge_ads
|
|
from pyfragment.domains.ads.tonup import topup_ton
|
|
from pyfragment.domains.base import BaseService
|
|
from pyfragment.models.payments import AdsRechargeResult, AdsTopupResult
|
|
|
|
if TYPE_CHECKING:
|
|
pass
|
|
|
|
|
|
class AdsService(BaseService):
|
|
async def recharge_ads(self, account: str, amount: int) -> AdsRechargeResult:
|
|
return await recharge_ads(self._client, account, amount)
|
|
|
|
async def topup_ton(self, username: str, amount: int, show_sender: bool = True) -> AdsTopupResult:
|
|
return await topup_ton(self._client, username, amount, show_sender=show_sender)
|