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

[SERVICES-2682] Fix staking outdated contracts #1518

Merged

Conversation

mad2sm0key
Copy link
Contributor

Reasoning

  • the userOutdatedContracts query always returns a result for positions in staking farms where the rewards have stopped

Proposed Changes

  • add early exit if the contract is not producing rewards in the compute method for outdated staking contracts
  • fix isProducingRewards method and usage in staking compute
  • add caching to isProducingRewards method

How to test

  • the query should not return a result if the user has a position in a staking farm that is no longer producing rewards
query {
  userOutdatedContracts {
    address
    type
    claimProgressOutdated
    farmToken 
  }
}

cfaur09
cfaur09 previously approved these changes Oct 29, 2024
Copy link

@cfaur09 cfaur09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 🟢

bogdan-rosianu
bogdan-rosianu previously approved these changes Oct 29, 2024
@mad2sm0key mad2sm0key dismissed stale reviews from bogdan-rosianu and cfaur09 via f3db4ca October 29, 2024 08:58
@mad2sm0key mad2sm0key merged commit 041821d into development Nov 5, 2024
1 check failed
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.

4 participants