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-2651] Add extra fields to staking model #1505

Merged

Conversation

mad2sm0key
Copy link
Contributor

Reasoning

  • expose values for staking APR and rewards remaining days if not capped by max APR

Proposed Changes

  • add aprIfUncapped and rewardsRemainingDaysIfUncapped fields to Staking model
  • add field resolvers and compute methods
  • small refactor to remove duplicate code

How to test

query {
  filteredStakingFarms(filters: {}, pagination: { first: 200 }) {
    edges {
      node {
        address
        farmingToken {
          identifier
        }
        apr
        aprIfUncapped
        rewardsRemainingDays
        rewardsRemainingDaysIfUncapped
      }
    }
  }
}

@cfaur09
Copy link

cfaur09 commented Oct 10, 2024

Test done 🟢

cfaur09
cfaur09 previously approved these changes Oct 10, 2024
src/modules/staking/models/staking.model.ts Outdated Show resolved Hide resolved
src/modules/staking/models/staking.model.ts Outdated Show resolved Hide resolved
src/modules/staking/services/staking.compute.service.ts Outdated Show resolved Hide resolved
@mad2sm0key mad2sm0key merged commit d578d92 into development Oct 11, 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