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