-
Notifications
You must be signed in to change notification settings - Fork 1
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
CSUB-946 wrong pending rewards calculation #42
Conversation
Test before merge -> Staking Dashboad Preview! |
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.
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.
src/contexts/Payouts/defaults.ts
Outdated
@@ -4,7 +4,7 @@ | |||
|
|||
import type { PayoutsContextInterface } from './types'; | |||
|
|||
export const MaxSupportedPayoutEras = 7; | |||
export const MaxSupportedPayoutEras = 84; |
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.
After a full 84 eras Polkadot JS Apps and Staking Dashboard seem to be in agreement about the total payouts:
However reloading the page results in 2 possible cases:
- Takes over 5 seconds to load, usually results in this console error:
- If I reload the page again sometimes it doesn't show the error and the reward number is displayed in the matter of 1-2 seconds after displaying the rest of the page.
77764dd
to
fa1bda9
Compare
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.
With the defaults of max 7 eras to claimed it looks good to me.
Pending rewards amount is in sync with Polkadot JS Apps.
Note: as soon as we have rewards from eras older than current_era - 7, they cannot be claimed via Staking Dashboard but can still be claimed via Polkadot JS Apps. This how Staking Dashboard is designed to work !
Fixed
MaxSupportedPayoutEras
to 84.One important thing is to clear the browser local storage before restart the chain and run the dashboard.
If it is not cleared, then the calculation will include the previous chain's values.