public async override Task Execute()
        {
            try
            {
                using (var identifier = Prompt.GetPasswordAsSecureString("Identifier:", ConsoleColor.Yellow))
                    using (var password = Prompt.GetPasswordAsSecureString("Password:"******"\nWallet Key set added!\n");
                            console.ForegroundColor = ConsoleColor.White;

                            return;
                        }

                        console.ForegroundColor = ConsoleColor.Red;
                        console.WriteLine("Something went wrong!");
                        console.ForegroundColor = ConsoleColor.White;
                    }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        public async Task <IActionResult> CreateWalletAddress([FromBody] CredentialsDto credentials)
        {
            var session   = new Session(credentials.Identifier.ToSecureString(), credentials.Password.ToSecureString());
            var keySet    = walletService.CreateKeySet();
            var addKeySet = await unitOfWork.GetKeySetRepository().Put(session, keySet);

            if (addKeySet.Success)
            {
                return(new CreatedResult("httpWallet", new { success = addKeySet.Result }));
            }

            return(new BadRequestResult());
        }