Exemple #1
0
        public async Task <ActionResult> Summary(int transferId, string returnUrl)
        {
            var transfer = await TransferReader.GetTransfer(User.Identity.GetUserId(), transferId);

            if (transfer == null)
            {
                ViewBag.Message = String.Format(Resources.UserWallet.transferNotFoundError, transferId);
                return(View("Error"));
            }

            transfer.ReturnUrl = GetLocalReturnUrl(returnUrl);
            return(View(transfer));
        }
Exemple #2
0
        public async Task <ActionResult> Donate(int currencyId)
        {
            var user = await UserManager.FindByIdAsync(User.Id());

            if (user == null)
            {
                return(Unauthorized());
            }

            var model = await TransferReader.GetCreateTransfer(User.Id(), currencyId);

            if (model == null)
            {
                return(ViewMessageModal(new ViewMessageModel(ViewMessageType.Danger, "Invalid Request", "An unknown error occured.")));
            }

            model.Recipient = "Faucet";
            model.TwoFactorComponentType = TwoFactorComponentType.Transfer;
            model.TwoFactorType          = await UserManager.GetUserTwoFactorTypeAsync(user.Id, TwoFactorComponentType.Transfer);

            return(View("DonateModal", model));
        }
Exemple #3
0
 public async Task <ActionResult> GetTransfers(DataTablesModel param)
 {
     return(DataTable(await TransferReader.GetTransfers(User.Identity.GetUserId(), param, new[] { TransferType.Mineshaft })));
 }
Exemple #4
0
 public async Task <ActionResult> GetTransfers(DataTablesModel param)
 {
     return(DataTable(await TransferReader.GetTransferDataTable(param)));
 }