public async Task <PartialViewResult> GetUserWallet()
        {
            if (User.Identity.IsAuthenticated)
            {
                var userWallet = await _userWalletService.GetUserWallet(_userManager.GetUserId(User));

                return(PartialView(userWallet));
            }
            Response.StatusCode = 500;
            return(PartialView("Exception"));
        }
Esempio n. 2
0
        public async Task <IActionResult> Index()
        {
            var model = new HomeViewModel {
                StockRates = await _ratesServices.GetStockRates()
            };

            if (User.Identity.IsAuthenticated)
            {
                model.UserWallet = await _userWalletService.GetUserWallet(_userManager.GetUserId(User));
            }
            return(View(model));
        }