Ejemplo n.º 1
0
        public async Task <WalletModel> CreateWallet([FromBody] CreateWalletRequest request)
        {
            var wallet = await _clientAccountService.CreateWalletAsync(_requestContext.ClientId, request.Type,
                                                                       request.Name, request.Description);

            return(new WalletModel
            {
                Id = wallet.Id,
                Name = wallet.Name,
                Type = wallet.Type,
                Description = wallet.Description
            });
        }
Ejemplo n.º 2
0
        public async Task <WalletModel> CreateWallet([FromBody] CreateWalletRequest request)
        {
            var wallet = await _clientAccountService.Wallets.CreateWalletAsync(
                new Lykke.Service.ClientAccount.Client.Models.Request.Wallets.CreateWalletRequest
            {
                ClientId    = _requestContext.ClientId,
                Description = request.Description,
                Name        = request.Name,
                Type        = request.Type,
                Owner       = OwnerType.Spot
            }
                );

            return(new WalletModel
            {
                Id = wallet.Id,
                Name = wallet.Name,
                Type = wallet.Type.ToString(),
                Description = wallet.Description
            });
        }