fix: resolve staking reward calculation for parachain (Asset Hub)

- Use remote RPC instead of local storage for era/exposure queries
- Resolve relay chain via parentId for exposure, totalIssuance, and parachains
- Remove StorageCache dependency, detect paged exposures via runtime metadata
- Add StakingRepository to NominationPoolRewardCalculatorFactory for direct queries
- Use storageOrNull for null-safety on chains without Paras pallet
This commit is contained in:
2026-02-14 05:38:47 +03:00
parent 921e6de224
commit c461e61895
7 changed files with 57 additions and 28 deletions
@@ -184,8 +184,8 @@ class RuntimeModule {
@Provides
@ApplicationScope
fun provideTotalIssuanceRepository(
@Named(LOCAL_STORAGE_SOURCE) localStorageSource: StorageDataSource,
): TotalIssuanceRepository = RealTotalIssuanceRepository(localStorageSource)
@Named(REMOTE_STORAGE_SOURCE) remoteStorageSource: StorageDataSource,
): TotalIssuanceRepository = RealTotalIssuanceRepository(remoteStorageSource)
@Provides
@ApplicationScope