-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add calculated stake rewards query #2380
base: development
Are you sure you want to change the base?
Conversation
21c975e
to
6b31bcd
Compare
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Field<ListGraphType<FungibleAssetValueType>>( | ||
"favs", | ||
resolve: context => context.Source.favs); | ||
Field<ListGraphType<InventoryItemType>>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These type should be non-nullable.
stakedNcg), | ||
stakeRegularRewardSheet.Keys.Max()); | ||
var itemSheet = accountState.GetItemSheet(); | ||
accountState.TryGetStakeStateV2(context.Source.AgentAddress, out var stakeStateV2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may be able to use context.Source.StakeState
instead.
: 1 + (int)Math.DivRem( | ||
context.Source.BlockIndex - stakeStateV2.ClaimableBlockIndex, | ||
stakeStateV2.Contract.RewardInterval, | ||
out _); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this field showing the rewards you're currently eligible for?
Introduce pre-calculated stake rewards query for prepare LoadIntoMyGarages plainValue. tested from https://github.com/planetarium/NineChronicles.Headless/tree/rc-calc-stake-rewards branch