コード例 #1
0
 public PurposeOfPaymentBuilder(
     IClientAccountClient clientAccountClient,
     IAssetsServiceWithCache assetsService)
 {
     _clientAccountClient = clientAccountClient;
     _assetsService       = assetsService;
 }
コード例 #2
0
 public WalletsController(IRequestContext requestContext, IClientAccountClient clientAccountService, IBalancesClient balancesClient, IHftInternalServiceAPI hftInternalService)
 {
     _requestContext       = requestContext ?? throw new ArgumentNullException(nameof(requestContext));
     _clientAccountService = clientAccountService ?? throw new ArgumentNullException(nameof(clientAccountService));
     _balancesClient       = balancesClient ?? throw new ArgumentNullException(nameof(balancesClient));
     _hftInternalService   = hftInternalService ?? throw new ArgumentNullException(nameof(hftInternalService));
 }
コード例 #3
0
        public FxPaygatePaymentUrlInputValidationModel(
            IHttpContextAccessor httpContextAccessor,
            IAssetsHelper assetHelper,
            IAssetDisclaimersClient assetDisclaimersClient,
            IPaymentSystemClient paymentSystemClient,
            IPersonalDataService personalDataService,
            IClientAccountClient clientAccountService,
            IAssetsService assetsService,
            IKycStatusService kycStatusService,
            ITierClient tierClient,
            IRateCalculatorClient rateCalculatorClient)
        {
            _assetsHelper           = assetHelper;
            _assetDisclaimersClient = assetDisclaimersClient;
            _clientAccountService   = clientAccountService;
            _assetsService          = assetsService;
            _kycStatusService       = kycStatusService;
            _tierClient             = tierClient;
            _rateCalculatorClient   = rateCalculatorClient;

            _clientId = httpContextAccessor.HttpContext.User?.Identity?.Name;
            var paymentLimitsTask = paymentSystemClient.GetPaymentLimitsAsync();
            var pdTask            = personalDataService.GetAsync(_clientId);

            Task.WhenAll(paymentLimitsTask, pdTask).GetAwaiter().GetResult();

            _paymentLimitsResponse = paymentLimitsTask.Result;
            _personalData          = pdTask.Result;
            RegisterRules();
        }
コード例 #4
0
ファイル: ClientAccountService.cs プロジェクト: wildbunny/MT
 public ClientAccountService(
     IClientAccountClient clientAccountsClient,
     IPersonalDataService personalDataService)
 {
     _clientAccountsClient = clientAccountsClient;
     _personalDataService  = personalDataService;
 }
コード例 #5
0
        public void SetUp()
        {
            _clientAccountsService = Mock.Of <IClientAccountClient>(r =>
                                                                    r.GetMarginEnabledAsync("id of client") == Task.FromResult(new MarginEnabledSettingsModel()));
            var publisher = Mock.Of <IMessageProducer <MarginTradingEnabledChangedMessage> >();

            Mock.Get(publisher)
            .Setup(s => s.ProduceAsync(It.IsNotNull <MarginTradingEnabledChangedMessage>()))
            .Returns(Task.CompletedTask).Callback <MarginTradingEnabledChangedMessage>(m => _sentMessage = m);
            var expectedRabbitMqSettings = new RabbitMqSettings
            {
                ConnectionString = "conn str",
                ExchangeName     = "exchange name"
            };
            var rabbitMqService = Mock.Of <IRabbitMqService>(s =>
                                                             s.GetProducer(expectedRabbitMqSettings.Equivalent(), true,
                                                                           s.GetJsonSerializer <MarginTradingEnabledChangedMessage>()) ==
                                                             publisher);

            _marginSettings = new MarginSettings
            {
                MtRabbitMqConnString = "conn str",
                RabbitMqQueues       = new RabbitMqQueues
                {
                    MarginTradingEnabledChanged = new RabbitMqQueueInfo {
                        ExchangeName = "exchange name"
                    }
                }
            };

            _marginTradingSettingsCacheService = Mock.Of <IMarginTradingSettingsCacheService>();
            _sut = new MarginTradingEnablingService(_clientAccountsService, rabbitMqService, _marginSettings,
                                                    _marginTradingSettingsCacheService);
            _sut.Start();
        }
コード例 #6
0
 public OrdersController(
     IRequestContext requestContext,
     ILykkePrincipal lykkePrincipal,
     IClientSessionsClient clientSessionsClient,
     IPersonalDataService personalDataService,
     IKycStatusService kycStatusService,
     IClientAccountClient clientAccountClient,
     IAssetsServiceWithCache assetsServiceWithCache,
     IMatchingEngineClient matchingEngineClient,
     ILimitOrdersRepositoryClient limitOrdersRepository,
     FeeSettings feeSettings,
     IOperationsClient operationsClient,
     BaseSettings baseSettings,
     IcoSettings icoSettings,
     GlobalSettings globalSettings)
 {
     _requestContext         = requestContext;
     _lykkePrincipal         = lykkePrincipal;
     _clientSessionsClient   = clientSessionsClient;
     _personalDataService    = personalDataService;
     _kycStatusService       = kycStatusService;
     _clientAccountClient    = clientAccountClient;
     _assetsServiceWithCache = assetsServiceWithCache;
     _matchingEngineClient   = matchingEngineClient;
     _limitOrdersRepository  = limitOrdersRepository;
     _feeSettings            = feeSettings;
     _operationsClient       = operationsClient;
     _baseSettings           = baseSettings;
     _icoSettings            = icoSettings;
     _globalSettings         = globalSettings;
 }
コード例 #7
0
 public OperationsController(
     IAssetsServiceWithCache assetsServiceWithCache,
     IBalancesClient balancesClient,
     IKycStatusService kycStatusService,
     IClientAccountClient clientAccountClient,
     FeeSettings feeSettings,
     BaseSettings baseSettings,
     IOperationsClient operationsClient,
     ICqrsEngine cqrsEngine,
     IRequestContext requestContext,
     IConfirmationCodesClient confirmationCodesClient,
     Google2FaService google2FaService)
 {
     _assetsServiceWithCache  = assetsServiceWithCache;
     _balancesClient          = balancesClient;
     _kycStatusService        = kycStatusService;
     _clientAccountClient     = clientAccountClient;
     _feeSettings             = feeSettings;
     _baseSettings            = baseSettings;
     _operationsClient        = operationsClient;
     _cqrsEngine              = cqrsEngine;
     _requestContext          = requestContext;
     _confirmationCodesClient = confirmationCodesClient;
     _google2FaService        = google2FaService;
 }
コード例 #8
0
 public SiriusWalletsService(
     long brokerAccountId,
     IApiClient siriusApiClient,
     IClientDialogsClient clientDialogsClient,
     IAssetsService assetsService,
     IKycStatusService kycStatusService,
     IClientAccountClient clientAccountClient,
     IBalanceService balanceService,
     ICqrsEngine cqrsEngine,
     IOperationsClient operationsClient,
     TargetClientIdFeeSettings feeSettings,
     ValidationService validationService,
     IdempotencyService idempotencyService,
     ILogFactory logFactory)
 {
     _brokerAccountId     = brokerAccountId;
     _siriusApiClient     = siriusApiClient;
     _clientDialogsClient = clientDialogsClient;
     _assetsService       = assetsService;
     _kycStatusService    = kycStatusService;
     _clientAccountClient = clientAccountClient;
     _balanceService      = balanceService;
     _cqrsEngine          = cqrsEngine;
     _operationsClient    = operationsClient;
     _feeSettings         = feeSettings;
     _validationService   = validationService;
     _idempotencyService  = idempotencyService;
     _log = logFactory.CreateLog(this);
 }
コード例 #9
0
        public TradingReportService(
            IEmailService emailService,
            IConvertService convertService,
            ISystemClock systemClock,
            ILog log,
            NotificationsSettings monthlyNotificationsSettings, //injected as named parameter
            NotificationsSettings dailyNotificationsSettings,   //injected as named parameter

            IClientAccountClient clientAccountClient,

            Backend.Contracts.IAccountsApi accountsApi,
            Backend.Contracts.IAccountHistoryApi accountHistoryApi,
            Backend.Contracts.ITradeMonitoringReadingApi tradeMonitoringReadingApi,
            Backend.Contracts.IAssetPairsReadingApi assetPairsReadingApi,

            IOvernightSwapHistoryRepository overnightSwapHistoryRepository)
        {
            _emailService   = emailService;
            _convertService = convertService;
            _systemClock    = systemClock;
            _log            = log;
            _monthlyNotificationsSettings = monthlyNotificationsSettings;
            _dailyNotificationsSettings   = dailyNotificationsSettings;

            _clientAccountClient = clientAccountClient;

            _accountsApi               = accountsApi;
            _accountHistoryApi         = accountHistoryApi;
            _tradeMonitoringReadingApi = tradeMonitoringReadingApi;
            _assetPairsReadingApi      = assetPairsReadingApi;

            _overnightSwapHistoryRepository = overnightSwapHistoryRepository;
        }
コード例 #10
0
ファイル: AccountManager.cs プロジェクト: forkme7/MT
 public AccountManager(AccountsCacheService accountsCacheService,
                       IMarginTradingAccountsRepository repository,
                       IConsole console,
                       MarginSettings marginSettings,
                       IRabbitMqNotifyService rabbitMqNotifyService,
                       IAccountGroupCacheService accountGroupCacheService,
                       IClientNotifyService clientNotifyService,
                       IClientAccountClient clientAccountClient,
                       IMarginTradingAccountsRepository accountsRepository,
                       ITradingConditionsCacheService tradingConditionsCacheService,
                       ILog log,
                       OrdersCache ordersCache,
                       IEventChannel <AccountBalanceChangedEventArgs> acountBalanceChangedEventChannel,
                       ITradingEngine tradingEngine)
     : base(nameof(AccountManager), 60000, log)
 {
     _accountsCacheService = accountsCacheService;
     _clientAccountClient  = clientAccountClient;
     _repository           = repository;
     _console                       = console;
     _marginSettings                = marginSettings;
     _rabbitMqNotifyService         = rabbitMqNotifyService;
     _accountGroupCacheService      = accountGroupCacheService;
     _accountsRepository            = accountsRepository;
     _tradingConditionsCacheService = tradingConditionsCacheService;
     _log = log;
     _clientNotifyService = clientNotifyService;
     _ordersCache         = ordersCache;
     _acountBalanceChangedEventChannel = acountBalanceChangedEventChannel;
     _tradingEngine = tradingEngine;
 }
コード例 #11
0
 public ClientBansMiddleware(RequestDelegate next, IClientAccountClient clientAccountClient,
                             ILog log)
 {
     _clientAccountClient = clientAccountClient;
     _log  = log;
     _next = next;
 }
コード例 #12
0
 public ClientController(
     ILog log,
     IClientSessionsClient clientSessionsClient,
     ILykkeRegistrationClient lykkeRegistrationClient,
     ClientAccountLogic clientAccountLogic,
     IRequestContext requestContext,
     IPersonalDataService personalDataService,
     IKycStatusService kycStatusService,
     IClientAccountClient clientAccountService,
     BaseSettings baseSettings,
     KycStatusValidator kycStatusValidator,
     IKycProfileService kycProfileService)
 {
     _log = log ?? throw new ArgumentNullException(nameof(log));
     _lykkeRegistrationClient = lykkeRegistrationClient ?? throw new ArgumentNullException(nameof(lykkeRegistrationClient));
     _clientSessionsClient    = clientSessionsClient;
     _clientAccountLogic      = clientAccountLogic;
     _kycStatusService        = kycStatusService;
     _requestContext          = requestContext ?? throw new ArgumentNullException(nameof(requestContext));
     _personalDataService     = personalDataService ?? throw new ArgumentNullException(nameof(personalDataService));
     _clientAccountService    = clientAccountService;
     _baseSettings            = baseSettings;
     _kycStatusValidator      = kycStatusValidator;
     _kycProfileService       = kycProfileService;
 }
コード例 #13
0
 public OrdersController(
     IRequestContext requestContext,
     IClientSessionsClient clientSessionsClient,
     IPersonalDataService personalDataService,
     IKycStatusService kycStatusService,
     IClientAccountClient clientAccountClient,
     IAssetsServiceClient assetsServiceClient,
     IMatchingEngineClient matchingEngineClient,
     FeeSettings feeSettings,
     IOperationsClient operationsClient,
     BaseSettings baseSettings,
     IcoSettings icoSettings,
     GlobalSettings globalSettings,
     IHistoryClient historyClient)
 {
     _requestContext       = requestContext;
     _clientSessionsClient = clientSessionsClient;
     _personalDataService  = personalDataService;
     _kycStatusService     = kycStatusService;
     _clientAccountClient  = clientAccountClient;
     _assetsServiceClient  = assetsServiceClient;
     _matchingEngineClient = matchingEngineClient;
     _feeSettings          = feeSettings;
     _operationsClient     = operationsClient;
     _baseSettings         = baseSettings;
     _icoSettings          = icoSettings;
     _globalSettings       = globalSettings;
     _historyClient        = historyClient;
 }
コード例 #14
0
 public D3UserController(
     ID3UserService userService,
     IClientAccountClient clientAccountClient
     )
 {
     _userService         = userService;
     _clientAccountClient = clientAccountClient;
 }
 public LimitOrderCommandHandler(
     IClientAccountClient clientAccountClient,
     ILimitOrdersRepository limitOrdersRepository,
     IAssetsServiceWithCache assetsServiceWithCache)
 {
     _clientAccountClient    = clientAccountClient;
     _limitOrdersRepository  = limitOrdersRepository;
     _assetsServiceWithCache = assetsServiceWithCache;
 }
コード例 #16
0
 public HistoryController(
     IOperationsHistoryClient operationsHistoryClient,
     IRequestContext requestContext,
     IClientAccountClient clientAccountService)
 {
     _operationsHistoryClient = operationsHistoryClient ?? throw new ArgumentNullException(nameof(operationsHistoryClient));
     _requestContext          = requestContext ?? throw new ArgumentNullException(nameof(requestContext));
     _clientAccountService    = clientAccountService ?? throw new ArgumentNullException(nameof(clientAccountService));
 }
コード例 #17
0
 public AssetsController(
     IClientAccountClient clientAccountClient,
     IAssetsHelper assetsHelper,
     IRequestContext requestContext)
 {
     _clientAccountClient = clientAccountClient;
     _assetsHelper        = assetsHelper;
     _requestContext      = requestContext;
 }
コード例 #18
0
        public RegistrationValidationModel(IClientAccountClient clientAccountService)
        {
            _clientAccountService = clientAccountService;

            RuleFor(reg => reg.Email).NotNull();
            RuleFor(reg => reg.Hint).ValidHintValue();
            RuleFor(reg => reg.Email).Must(IsEmaiVerified).WithMessage(Phrases.EmailNotVerified);
            //RuleFor(reg => reg.Email).Must(IsTraderWithEmailExistsForPartner).WithMessage(Phrases.ClientWithEmailIsRegistered);
        }
コード例 #19
0
 public MarginTradingEnablingService(IClientAccountClient clientAccountClient, IRabbitMqService rabbitMqService,
                                     MarginSettings settings,
                                     IMarginTradingSettingsCacheService marginTradingSettingsCacheService)
 {
     _marginSettings      = settings;
     _rabbitMqService     = rabbitMqService;
     _clientAccountClient = clientAccountClient;
     _marginTradingSettingsCacheService = marginTradingSettingsCacheService;
 }
コード例 #20
0
        public RegistrationValidationModel(
            IClientAccountClient clientAccountService,
            DeploymentSettings deploymentSettings)
        {
            _clientAccountService = clientAccountService;
            _deploymentSettings   = deploymentSettings;

            RegisterRules();
        }
コード例 #21
0
 public ContextFactory(
     IClientTradesFactory clientTradesFactory,
     IClientAccountClient clientAccountClient,
     IAssetsServiceWithCache assetsServiceWithCache)
 {
     _clientTradesFactory    = clientTradesFactory;
     _clientAccountClient    = clientAccountClient;
     _assetsServiceWithCache = assetsServiceWithCache;
 }
コード例 #22
0
 public PaymentMethodsController(
     IClientAccountClient clientAccount,
     IAppGlobalSettingsService appGlobalSettingsService,
     PaymentSettings paymentSettings)
 {
     _clientAccount            = clientAccount;
     _appGlobalSettingsService = appGlobalSettingsService;
     _paymentSettings          = paymentSettings;
 }
コード例 #23
0
 public PaymentOkEmailSender(
     IEmailSender emailSender,
     IPersonalDataService personalDataService,
     IClientAccountClient clientAccountClient,
     ILogFactory logFactory)
 {
     _emailSender         = emailSender;
     _personalDataService = personalDataService;
     _log = logFactory.CreateLog(this);
     _clientAccountClient = clientAccountClient;
 }
コード例 #24
0
 public PaymentMethodsController(
     Link4PayService.Link4PayServiceClient link4PayServiceClient,
     IClientAccountClient clientAccountClient,
     IRequestContext requestContext,
     IAssetsHelper assetsHelper)
 {
     _link4PayServiceClient = link4PayServiceClient;
     _clientAccountClient   = clientAccountClient;
     _requestContext        = requestContext;
     _assetsHelper          = assetsHelper;
 }
コード例 #25
0
 public OrdersPublisher(
     [NotNull] IClientAccountClient clientAccountClient,
     [NotNull] IOrdersConverter ordersConverter,
     [NotNull] ISessionCache sessionCache,
     [NotNull] IWampHostedRealm realm)
 {
     _clientAccountClient = clientAccountClient ?? throw new ArgumentNullException(nameof(clientAccountClient));
     _ordersConverter     = ordersConverter ?? throw new ArgumentNullException(nameof(ordersConverter));
     _sessionCache        = sessionCache ?? throw new ArgumentNullException(nameof(sessionCache));
     _subject             = realm?.Services.GetSubject(Topic) ?? throw new ArgumentNullException(nameof(realm));
 }
コード例 #26
0
 public AssetsController(
     IClientAccountClient clientAccountClient,
     ISiriusWalletsService siriusWalletsService,
     IAssetsHelper assetsHelper,
     IRequestContext requestContext)
 {
     _clientAccountClient  = clientAccountClient;
     _siriusWalletsService = siriusWalletsService;
     _assetsHelper         = assetsHelper;
     _requestContext       = requestContext;
 }
コード例 #27
0
 public NotificationsController(
     IRequestContext requestContext,
     IClientAccountClient clientAccountClient,
     IPushNotificationsClient pushNotificationsClient,
     ILog log
     )
 {
     _requestContext          = requestContext;
     _clientAccountClient     = clientAccountClient;
     _pushNotificationsClient = pushNotificationsClient;
     _log = log;
 }
コード例 #28
0
 public LimitsController(
     ILimitsService limitsService,
     IClientAccountClient clientAccountClient,
     ISettingsService settingsService,
     IMapper mapper
     )
 {
     _limitsService       = limitsService;
     _clientAccountClient = clientAccountClient;
     _settingsService     = settingsService;
     _mapper = mapper;
 }
コード例 #29
0
 public LimitOrderCommandHandler(
     IClientAccountClient clientAccountClient,
     ILimitOrdersRepository limitOrdersRepository,
     IAssetsServiceWithCache assetsServiceWithCache,
     ILogFactory logFactory
     )
 {
     _clientAccountClient    = clientAccountClient;
     _limitOrdersRepository  = limitOrdersRepository;
     _assetsServiceWithCache = assetsServiceWithCache;
     _log = logFactory.CreateLog(this);
 }
コード例 #30
0
 public ProfileActionHandler(
     IHttpContextAccessor httpContextAccessor,
     IUserManager userManager,
     IClientAccountClient clientAccountClient,
     IKycProfileService kycProfileService
     )
 {
     _httpContextAccessor = httpContextAccessor;
     _userManager         = userManager;
     _clientAccountClient = clientAccountClient;
     _kycProfileService   = kycProfileService;
 }