Skip to content

Commit

Permalink
refactor: always report the progress and return the answers
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamantios committed Nov 2, 2023
1 parent 06926b6 commit 43e5724
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/valory/contracts/realitio/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,11 @@ def get_claim_params(
)
return dict(error=msg)

if len(answered) == 0:
msg = (
f"No answers have been given for question with id {question_id.hex()} "
f"between blocks {from_block} and {to_block}."
)
return dict(info=msg)

return dict(answered=answered)
msg = (
f"Found {len(answered)} answers for question with id {question_id.hex()} "
f"between blocks {from_block} and {to_block}."
)
return dict(info=msg, answered=answered)

@classmethod
def build_claim_winnings(
Expand Down

0 comments on commit 43e5724

Please sign in to comment.