public override async Task Execute() { try { using (var identifier = Prompt.GetPasswordAsSecureString("Identifier:", ConsoleColor.Yellow)) using (var password = Prompt.GetPasswordAsSecureString("Password:"******"\nWallet balance: {total}\n"); console.ForegroundColor = ConsoleColor.White; } } catch (Exception ex) { throw ex; } }
public async Task <IActionResult> WalletBalance([FromBody] CredentialsDto credentials) { var total = await walletService.AvailableBalanceGeneric(credentials.Identifier.ToSecureString(), credentials.Password.ToSecureString()); return(new OkObjectResult(new { balance = total })); }