feat: update payment method defaults to use PaymentMethod enum; refactor related validation checks

This commit is contained in:
bohd4nx
2026-05-29 22:31:30 +03:00
parent 5124af17ef
commit 6aa7037380
13 changed files with 49 additions and 38 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import json
import logging
from typing import TYPE_CHECKING
from pyfragment.core.constants import ADS_TOPUP_PAGE, DEVICE
from pyfragment.core.constants import ADS_TOPUP_PAGE, DEVICE_INFO
from pyfragment.domains.payments import parse_required_payment_amount
from pyfragment.domains.tonapi.account import get_account_info
from pyfragment.domains.tonapi.transaction import process_transaction
@@ -48,7 +48,7 @@ async def topup_ton(client: FragmentClient, username: str, amount: int, show_sen
"getAdsTopupLink",
{
"account": json.dumps(account),
"device": DEVICE,
"device": json.dumps(DEVICE_INFO),
"transaction": 1,
"id": req_id,
"show_sender": int(show_sender),