diff --git a/src/rpc/lrpc_reward_api.py b/src/rpc/lrpc_reward_api.py index a770fed2..1a27d339 100644 --- a/src/rpc/lrpc_reward_api.py +++ b/src/rpc/lrpc_reward_api.py @@ -93,7 +93,7 @@ def __get_unfrozen_rewards(self, level_of_last_block_in_unfreeze_cycle, cycle): balance_update = balance_updates[i] if balance_update["kind"] == "freezer": if balance_update["delegate"] == self.baking_address: - if int(balance_update["cycle"]) != cycle or int(balance_update["change"])>0: + if int(balance_update["cycle"]) == cycle or int(balance_update["change"])<0: if balance_update["category"] == "rewards": unfrozen_rewards = -int(balance_update["change"]) logger.debug("[__get_unfrozen_rewards] Found balance update for reward {}".format(balance_update)) diff --git a/src/rpc/prpc_reward_api.py b/src/rpc/prpc_reward_api.py index 781e1143..789cd074 100644 --- a/src/rpc/prpc_reward_api.py +++ b/src/rpc/prpc_reward_api.py @@ -92,7 +92,7 @@ def __get_unfrozen_rewards(self, level_of_last_block_in_unfreeze_cycle, cycle): balance_update = balance_updates[i] if balance_update["kind"] == "freezer": if balance_update["delegate"] == self.baking_address: - if int(balance_update["cycle"]) != cycle or int(balance_update["change"])>0: + if int(balance_update["cycle"]) == cycle or int(balance_update["change"]) < 0: if balance_update["category"] == "rewards": unfrozen_rewards = -int(balance_update["change"]) logger.debug("[__get_unfrozen_rewards] Found balance update for reward {}".format(balance_update))