Skip to content

Commit

Permalink
GetFilterChanges return a empty object instead of null when no change…
Browse files Browse the repository at this point in the history
…s. (#242)

* if no blocks return object instead of null

* fix compile error

* logs return object instead of null

* return object install null
  • Loading branch information
giskook authored Aug 12, 2024
1 parent 64de8c9 commit 3e5f8c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jsonrpc/endpoints_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ func (e *EthEndpoints) GetFilterChanges(filterID string) (interface{}, types.Err
return nil, rpcErr
}
if len(res) == 0 {
return nil, nil
return []common.Hash{}, nil
}
return res, nil
}
Expand All @@ -488,7 +488,7 @@ func (e *EthEndpoints) GetFilterChanges(filterID string) (interface{}, types.Err
return nil, rpcErr
}
if len(res) == 0 {
return nil, nil
return []common.Hash{}, nil
}
return res, nil
}
Expand All @@ -511,7 +511,7 @@ func (e *EthEndpoints) GetFilterChanges(filterID string) (interface{}, types.Err
}
res := resInterface.([]types.Log)
if len(res) == 0 {
return nil, nil
return []types.Log{}, nil
}
return res, nil
}
Expand Down

0 comments on commit 3e5f8c4

Please sign in to comment.