"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetWalletByIdUseCase = void 0;
const not_found_error_1 = require("../../../domain/errors/not-found-error");
class GetWalletByIdUseCase {
    walletRepository;
    constructor(walletRepository) {
        this.walletRepository = walletRepository;
    }
    async execute(id) {
        const wallet = await this.walletRepository.findById(id);
        if (!wallet) {
            throw new not_found_error_1.NotFoundError('Wallet', id);
        }
        return wallet;
    }
}
exports.GetWalletByIdUseCase = GetWalletByIdUseCase;
//# sourceMappingURL=get-wallet-by-id.use-case.js.map