Exemplo n.º 1
0
        public async Task <IActionResult> Features()
        {
            var features = await _clientAccountService.GetFeaturesAsync(_requestContext.ClientId);

            return(Ok(new FeaturesResponseModel
            {
                AffiliateEnabled = features.AffiliateEnabled
            }));
        }
Exemplo n.º 2
0
        public async Task <FeaturesResponseModel> Features()
        {
            var features = await _clientAccountService.GetFeaturesAsync(_requestContext.ClientId);

            var tradingSession = await _clientSessionsClient.GetTradingSession(_lykkePrincipal.GetToken());

            return(new FeaturesResponseModel
            {
                AffiliateEnabled = features.AffiliateEnabled,
                TradingSession = new TradingSessionResponseModel
                {
                    Enabled = _baseSettings.EnableSessionValidation,
                    Confirmed = tradingSession?.Confirmed,
                    Ttl = tradingSession?.Ttl?.TotalMilliseconds
                }
            });
        }