rpc: do not return error if account is not found for getunclaimed call

Follow the reference behaviour.
This commit is contained in:
Anna Shaleva 2021-09-14 13:58:33 +03:00
parent 580f1787b9
commit 233aa94bba

View file

@ -1397,7 +1397,7 @@ func (s *Server) getUnclaimed(ps request.Params) (interface{}, *response.Error)
acc := s.chain.GetAccountState(u)
if acc == nil {
return nil, response.NewInternalServerError("unknown account", nil)
return &result.Unclaimed{}, nil
}
res, errRes := result.NewUnclaimed(acc, s.chain)
if errRes != nil {