Skip to content

Commit

Permalink
For events with no target dont take target into account at filtering
Browse files Browse the repository at this point in the history
Fix #2373
  • Loading branch information
LefterisJP committed Sep 7, 2018
1 parent a65d676 commit dd83c16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion raiden/api/python.py
Expand Up @@ -50,13 +50,15 @@ def event_filter(
token_network_identifier: typing.TokenNetworkID = None,
target_address: typing.Address = None,
):
event_target = getattr(event, 'target', None)
return (
isinstance(event, EVENTS_PAYMENT_HISTORY_RELATED) and (
token_network_identifier is None or
token_network_identifier == event.token_network_identifier
) and (
target_address is None or
getattr(event, 'target', None) == target_address
event_target is None or
event_target == target_address
)
)

Expand Down

0 comments on commit dd83c16

Please sign in to comment.