Exemple #1
0
        public WalletService(
            ICqrsEngine cqrsEngine,
            IBlockchainWalletsRepository walletRepository,
            IBlockchainSignFacadeClient blockchainSignFacadeClient,
            IAddressParser addressParser,
            IFirstGenerationBlockchainWalletRepository firstGenerationBlockchainWalletRepository,
            IAssetsServiceWithCache assetsServiceWithCache,
            IBlockchainExtensionsService blockchainExtensionsService,
            IAddressService addressService,
            ILegacyWalletService legacyWalletService,
            ILogFactory logFactory)
        {
            _cqrsEngine                 = cqrsEngine ?? throw new ArgumentNullException(nameof(cqrsEngine));
            _walletRepository           = walletRepository ?? throw new ArgumentNullException(nameof(walletRepository));
            _blockchainSignFacadeClient = blockchainSignFacadeClient ??
                                          throw new ArgumentNullException(nameof(blockchainSignFacadeClient));
            _addressParser = addressParser ?? throw new ArgumentNullException(nameof(addressParser));
            _firstGenerationBlockchainWalletRepository = firstGenerationBlockchainWalletRepository ??
                                                         throw new ArgumentNullException(
                                                                   nameof(firstGenerationBlockchainWalletRepository));
            _assetsServiceWithCache =
                assetsServiceWithCache ?? throw new ArgumentNullException(nameof(assetsServiceWithCache));
            _blockchainExtensionsService = blockchainExtensionsService ?? throw new ArgumentNullException(nameof(blockchainExtensionsService));
            _addressService      = addressService ?? throw new ArgumentNullException(nameof(addressService));
            _legacyWalletService = legacyWalletService ?? throw new ArgumentNullException(nameof(legacyWalletService));

            if (logFactory == null)
            {
                throw new ArgumentNullException(nameof(logFactory));
            }
            _log = logFactory.CreateLog(this);
        }
        public SrvSolarCoinHelper(SolarCoinServiceClientSettings solarCoinSettings, ILogFactory logFactory,
                                  IFirstGenerationBlockchainWalletRepository walletCredentialsRepository)
        {
            if (logFactory == null)
            {
                throw new ArgumentNullException(nameof(logFactory));
            }
            _log = logFactory.CreateLog(this);

            _httpClient                  = new HttpClient();
            _solarCoinSettings           = solarCoinSettings;
            _walletCredentialsRepository = walletCredentialsRepository ?? throw new ArgumentNullException(nameof(walletCredentialsRepository));
        }
 public LegacyWalletService(
     IFirstGenerationBlockchainWalletRepository firstGenerationBlockchainWalletRepository,
     ISrvSolarCoinHelper srvSolarCoinHelper,
     IAssetsServiceWithCache assetsServiceWithCache,
     ISrvEthereumHelper srvEthereumHelper,
     ISrvBlockchainHelper srvBlockchainHelper)
 {
     _firstGenerationBlockchainWalletRepository = firstGenerationBlockchainWalletRepository;
     _srvSolarCoinHelper     = srvSolarCoinHelper;
     _assetsServiceWithCache = assetsServiceWithCache;
     _srvEthereumHelper      = srvEthereumHelper;
     _srvBlockchainHelper    = srvBlockchainHelper;
 }
        public SrvBlockchainHelper(IFirstGenerationBlockchainWalletRepository walletCredentialsRepository,
                                   ILogFactory logFactory,
                                   IClientAccountClient clientAccountService,
                                   IBitcoinApiClient bitcoinApiClient,
                                   BitcoinCoreSettings btcSettings)
        {
            if (logFactory == null)
            {
                throw new ArgumentNullException(nameof(logFactory));
            }
            _log = logFactory.CreateLog(this);

            _walletCredentialsRepository = walletCredentialsRepository ?? throw new ArgumentNullException(nameof(walletCredentialsRepository));
            _clientAccountService        = clientAccountService ?? throw new ArgumentNullException(nameof(clientAccountService));
            _bitcoinApiClient            = bitcoinApiClient ?? throw new ArgumentNullException(nameof(bitcoinApiClient));
            _btcSettings = btcSettings ?? throw new ArgumentNullException(nameof(btcSettings));
        }