website refactor

This commit is contained in:
2026-01-16 01:00:03 +01:00
parent ce7be39155
commit a98e3e3166
286 changed files with 5522 additions and 5261 deletions

View File

@@ -1,9 +1,26 @@
import { Result } from '@/lib/contracts/Result';
import { Service } from '@/lib/contracts/services/Service';
import { Service, DomainError } from '@/lib/contracts/services/Service';
import { LeagueWalletApiDto } from '@/lib/types/tbd/LeagueWalletApiDto';
export class LeagueWalletService implements Service {
async getWalletData(leagueId: string): Promise<Result<LeagueWalletApiDto, never>> {
async getWalletForLeague(leagueId: string): Promise<LeagueWalletApiDto> {
const result = await this.getWalletData(leagueId);
if (result.isErr()) throw new Error(result.getError().message);
return result.unwrap();
}
async withdraw(
leagueId: string,
amount: number,
currency: string,
seasonId: string,
destinationId: string
): Promise<{ success: boolean; message?: string }> {
// Mock implementation
return { success: true };
}
async getWalletData(leagueId: string): Promise<Result<LeagueWalletApiDto, DomainError>> {
// Mock data since backend not implemented
const mockData: LeagueWalletApiDto = {
leagueId,
@@ -46,4 +63,4 @@ export class LeagueWalletService implements Service {
};
return Result.ok(mockData);
}
}
}