Exemple #1
0
        public async Task <IActionResult> GetOperationsHistoryAsync([FromQuery] int offset = 0,
                                                                    [FromQuery] int take   = 100)
        {
            var history = await _historyWrapperClient.GetOperationsHistoryAsync(
                User.GetWalletId(),
                offset,
                take);

            return(Ok(ResponseModel <List <Models.Operations.OperationModel> > .Ok(
                          _mapper.Map <List <Models.Operations.OperationModel> >(history.ToList()))));
        }
        public override async Task <GetOperationsHistoryResponse> GetOperationsHistory(GetOperationsHistoryRequest request, ServerCallContext context)
        {
            var history = await _historyClient.GetOperationsHistoryAsync(
                context.GetHttpContext().User.GetWalletId(),
                request.Offset,
                request.Take);

            var response = new GetOperationsHistoryResponse();

            response.Operations.AddRange(_mapper.Map <List <OperationHistory> >(history));
            return(response);
        }