website refactor
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import { Result } from '@/lib/contracts/Result';
|
||||
import { DomainError, Service } from '@/lib/contracts/services/Service';
|
||||
|
||||
/**
|
||||
* Wallet Service - DTO Only
|
||||
*
|
||||
* Returns raw API DTOs. No ViewModels or UX logic.
|
||||
* All client-side presentation logic must be handled by hooks/components.
|
||||
*/
|
||||
export class WalletService {
|
||||
constructor(private readonly apiClient: any) {}
|
||||
export class WalletService implements Service {
|
||||
constructor() {}
|
||||
|
||||
async getWalletBalance(driverId: string): Promise<any> {
|
||||
return { balance: 0, currency: 'USD' };
|
||||
async getWalletBalance(_: string): Promise<Result<{ balance: number; currency: string }, DomainError>> {
|
||||
return Result.ok({ balance: 0, currency: 'USD' });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user