Пример #1
0
 public BlockchainWalletsCacheService(IBlockchainApiClientProvider blockchainApiClientProvider, ILogFactory logFactory)
 {
     _log = logFactory.CreateLog(this);
     _blockchainApiClientProvider     = blockchainApiClientProvider;
     _cacheCapabilities               = new ConcurrentDictionary <string, bool>();
     _blockchainConnectAttemptsDelays = new ConcurrentDictionary <string, int>();
 }
        public DepositWalletsBalanceProcessingPeriodicalHandler(
            ILogFactory logFactory,
            TimeSpan period,
            int batchSize,
            string blockchainType,
            IBlockchainApiClientProvider blockchainApiClientProvider,
            ICqrsEngine cqrsEngine,
            IAssetsServiceWithCache assetsService,
            IEnrolledBalanceRepository enrolledBalanceRepository,
            IHotWalletsProvider hotWalletsProvider,
            ICashinRepository cashinRepository,
            IDepositWalletLockRepository depositWalletLockRepository,
            IChaosKitty chaosKitty)
        {
            _logFactory                  = logFactory;
            _batchSize                   = batchSize;
            _blockchainType              = blockchainType;
            _blockchainApiClient         = blockchainApiClientProvider.Get(blockchainType);
            _cqrsEngine                  = cqrsEngine;
            _assetsService               = assetsService;
            _enrolledBalanceRepository   = enrolledBalanceRepository;
            _hotWalletsProvider          = hotWalletsProvider;
            _cashinRepository            = cashinRepository;
            _depositWalletLockRepository = depositWalletLockRepository;
            _chaosKitty                  = chaosKitty;

            _timer = new TimerTrigger(
                $"{nameof(DepositWalletsBalanceProcessingPeriodicalHandler)} : {blockchainType}",
                period,
                _logFactory);

            _timer.Triggered += ProcessBalancesAsync;
        }
 public ClearBroadcastedTransactionCommandsHandler(
     IChaosKitty chaosKitty,
     IBlockchainApiClientProvider apiClientProvider)
 {
     _chaosKitty = chaosKitty;
     _apiClientProvider = apiClientProvider;
 }
 public WaitForTransactionEndingCommandsHandler(
     ILogFactory logFactory,
     RetryDelayProvider delayProvider,
     IBlockchainApiClientProvider apiClientProvider)
 {
     _log               = logFactory.CreateLog(this);
     _delayProvider     = delayProvider;
     _apiClientProvider = apiClientProvider;
 }
Пример #5
0
 public WalletService(
     IBlockchainApiClientProvider blockchainApiClientProvider,
     IEnrolledBalanceRepository enrolledBalanceRepository,
     AssetService assetService)
 {
     _blockchainApiClientProvider = blockchainApiClientProvider;
     _enrolledBalanceRepository   = enrolledBalanceRepository;
     _assetService = assetService;
 }
 public ValidationService(IBlockchainApiClientProvider blockchainApiClientProvider,
                          IAssetsServiceWithCache assetsService,
                          IBlockchainSettingsProvider blockchainSettingsProvider,
                          IBlockchainWalletsClient blockchainWalletsClient,
                          IBlackListService blackListService,
                          AddressExtensionService addressExtensionService,
                          IBlockchainWalletsCacheService blockchainWalletsCacheService)
 {
     _blockchainApiClientProvider = blockchainApiClientProvider;
     _assetsService = assetsService;
     _blockchainSettingsProvider    = blockchainSettingsProvider;
     _blackListService              = blackListService;
     _blockchainWalletsClient       = blockchainWalletsClient;
     _addressExtensionService       = addressExtensionService;
     _blockchainWalletsCacheService = blockchainWalletsCacheService;
 }
Пример #7
0
 public BlackListService(IBlackListRepository blackListRepository,
                         IBlockchainApiClientProvider blockchainApiClientProvider)
 {
     _blackListRepository         = blackListRepository;
     _blockchainApiClientProvider = blockchainApiClientProvider;
 }
 public TransferService(IBlockchainApiClientProvider blockchainApiClientProvider,
                        AssetService assetService)
 {
     _blockchainApiClientProvider = blockchainApiClientProvider;
     _assetService = assetService;
 }
        //private ConcurrentDictionary<string, ConcurrentDictionary<string, BlockchainAsset>> _dictionary =
        //    new ConcurrentDictionary<string, ConcurrentDictionary<string, BlockchainAsset>>();

        public AssetService(IBlockchainApiClientProvider blockchainApiClientProvider)
        {
            _blockchainApiClientProvider = blockchainApiClientProvider;
        }