Exemplo n.º 1
0
 /// <summary>
 /// 分类获取账号,1:所有找零账户,2:所有创建账户,3:所有观察者账户,0或者其他:所有账户信息
 /// </summary>
 /// <param name="category"></param>
 /// <returns></returns>
 public IRpcMethodResult GetAccountCategory(int category)
 {
     try
     {
         List <Account> result = new AccountComponent().GetAccountCategory(category);
         result.ForEach(x => x.PrivateKey = null);
         return(Ok(result));
     }
     catch (CommonException ce)
     {
         return(Error(ce.ErrorCode, ce.Message, ce));
     }
     catch (Exception ex)
     {
         return(Error(ErrorCode.UNKNOWN_ERROR, ex.Message, ex));
     }
 }