Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rewards issue #770

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

Divya-Solulab
Copy link

Proposed changes

This update addresses an edge case in transaction fee history calculations. The issue arises when there are only two rewards in the fee history. In such cases, calculating percentage increases would produce a single-element list, causing an error during unpacking.

Additionally, we’ve identified a potential edge case: if only one reward is present, calculating percentage increases would yield an empty list, leading to a failure.

Fixes

  • Resolved unpacking issue by removing the unpack operator.
  • To handle the single-reward scenario, we’ve introduced a fallback mechanism:
    • Incrementally adjust the fee history percentile up to a maximum of 3 retries to obtain at least two rewards.

Adamantios

This comment was marked as resolved.

@Adamantios Adamantios requested a review from 0xArdi November 14, 2024 16:37
@0xArdi
Copy link
Collaborator

0xArdi commented Nov 14, 2024

The doc link fix is on #769

@Adamantios Adamantios merged commit 8fa3599 into valory-xyz:main Nov 14, 2024
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants