private void UnlockAccount(string address, bool timeout = true) { var accounts = _keyStore.ListAccounts(); if (accounts == null || accounts.Count <= 0) { _screenManager.PrintError("error: the account '" + address + "' does not exist."); return; } if (!accounts.Contains(address)) { _screenManager.PrintError("account does not exist!"); return; } var password = _screenManager.AskInvisible("password: "******"incorrect password!"); } else if (tryOpen == AElfKeyStore.Errors.AccountAlreadyUnlocked) { _screenManager.PrintError("account already unlocked!"); } else if (tryOpen == AElfKeyStore.Errors.None) { _screenManager.PrintLine("account successfully unlocked!"); } }
public CommandInfo ListAccount() { var result = new CommandInfo("account list", "account"); result.InfoMsg = _keyStore.ListAccounts(); if (result.InfoMsg.Count != 0) { result.Result = true; } return(result); }