website refactor

This commit is contained in:
2026-01-14 02:02:24 +01:00
parent 8d7c709e0c
commit 4522d41aef
291 changed files with 12763 additions and 9309 deletions

View File

@@ -0,0 +1,40 @@
import { WalletsApiClient } from '@/lib/api/wallets/WalletsApiClient';
import type { LeagueWalletDTO, WithdrawRequestDTO, WithdrawResponseDTO } from '@/lib/api/wallets/WalletsApiClient';
/**
* LeagueWalletService - DTO Only
*
* Returns raw API DTOs. No ViewModels or UX logic.
* All client-side presentation logic must be handled by hooks/components.
*/
export class LeagueWalletService {
constructor(
private readonly apiClient: WalletsApiClient
) {}
/**
* Get wallet for a league
*/
async getWalletForLeague(leagueId: string): Promise<LeagueWalletDTO> {
return this.apiClient.getLeagueWallet(leagueId);
}
/**
* Withdraw from league wallet
*/
async withdraw(
leagueId: string,
amount: number,
currency: string,
seasonId: string,
destinationAccount: string
): Promise<WithdrawResponseDTO> {
const payload: WithdrawRequestDTO = {
amount,
currency,
seasonId,
destinationAccount,
};
return this.apiClient.withdrawFromLeagueWallet(leagueId, payload);
}
}