Merge pull request #2176 from nspcc-dev/rpc/fix-getunclaimed

rpc: do not return error if account is not found for `getunclaimed` call
This commit is contained in:
Roman Khimov 2021-09-14 14:47:35 +03:00 committed by GitHub
commit 56c20ed817
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {