Closed TarikGul closed 4 months ago
It might be useful to add some throttling to api.derive.staking.queryMulti
so that thousands of calls aren't emitted at the same time. (Not sure if this is the appropriate decision yet as I have not thought about it much.)
Note: I wont be able to test this against Apps until I have some stable internet come Sunday as I am still OOO.
I tested each call that was changed against polkadex to ensure the old calls are now available, and I also ensured everything is fault tolerant so it wont fail if the calls don't exist.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
This PR works on giving the support needed for backwards compatibility. With the recent staking breaking changes these PR's introduced: https://github.com/polkadot-js/api/pull/5860 https://github.com/polkadot-js/api/pull/5862 It also ended up breaking compatibility for some parachains in the UI.
This is part 1 of the staking changes saga, and once this goes in I can rework the UI to have support for the new and the old.
Summary
ownExposure
&&ownExposures
will properly build safe types for historic calls such aserasStakers
, anderasStakersClipped
. It also ensures the calls exist or else will default to the empty type.query
&&queryMulti
now take in a flagwithExposureErasStakersLegacy
and returns a new field calledexposureEraStakers
nextElected
now has support for botherasStakersPaged
anderasStakers
.TODO:
NOTE: My one concern is that api.derive.staking.stakersRewards* uses
withClaimedErasRewards
as a default flag here which could potentially still act as a regression for the UI.rel: https://github.com/polkadot-js/apps/issues/10512 rel :https://github.com/polkadot-js/apps/issues/10513 rel: https://github.com/polkadot-js/apps/issues/10505