fix: resolve parentId for Asset Hub staking to relay chain

ValidatorProvider, DirectStakingProperties, and DirectStakingRecommendation
were querying Asset Hub chainId for staking data (validators, exposures,
minStake, maxNominations) but these live on the relay chain. Added
chain.parentId resolution so parachain staking correctly routes to relay.

Also:
- Add VoterBagsList pallet support (Pezkuwi naming)
- Wrap BagListRepository queries in runCatching for binding compat
- Remove debug logging
This commit is contained in:
2026-02-15 22:25:48 +03:00
parent ffae9159fe
commit fa17968108
8 changed files with 34 additions and 38 deletions
@@ -257,7 +257,7 @@ fun Module.constantOrNull(name: String) = constants[name]
fun RuntimeMetadata.staking() = module(Modules.STAKING)
fun RuntimeMetadata.voterListOrNull() = firstExistingModuleOrNull(Modules.VOTER_LIST, Modules.BAG_LIST)
fun RuntimeMetadata.voterListOrNull() = firstExistingModuleOrNull(Modules.VOTER_LIST, Modules.BAG_LIST, Modules.VOTER_BAGS_LIST)
fun RuntimeMetadata.voterListName(): String = requireNotNull(voterListOrNull()).name
fun RuntimeMetadata.system() = module(Modules.SYSTEM)
@@ -632,6 +632,7 @@ object Modules {
const val VOTER_LIST = "VoterList"
const val BAG_LIST = "BagsList"
const val VOTER_BAGS_LIST = "VoterBagsList"
const val ELECTION_PROVIDER_MULTI_PHASE = "ElectionProviderMultiPhase"