Commit Graph

14 Commits

Author SHA1 Message Date
pezkuwichain 1fd75fa043 fix: TS2554 getByNetworkId options param + prettier formatting 2026-03-10 00:16:05 +03:00
pezkuwichain 23b6227772 fix: stale activeStakers — era detection fallback + cleanup on era change
- handleBlock now checks activeEra every block as fallback when
  StakersElected event is dropped due to pruned state patch
- Clear all existing ActiveStaker entries before saving fresh data
  from current era exposure set (prevents stale nominators)
- Re-save pool stash accounts after cleanup
- Robust exposure parsing (handle Option and non-Option types)
- Better error logging with stack traces for APY computation failures
2026-03-10 00:11:50 +03:00
pezkuwichain 6c5b7ae879 feat: save direct nominators and validators as activeStakers on AH
Previously only pool stash accounts were saved as activeStakers.
Direct nominators/validators on Asset Hub were missing, causing
the wallet dashboard to show INACTIVE for direct stakers.
2026-02-21 02:42:18 +03:00
pezkuwichain 727deaefb6 Fix Prettier formatting 2026-02-21 01:49:53 +03:00
pezkuwichain 3cc7a7b245 Remove relay staking handlers after pallet removal (spec 1_020_006)
Staking pallet (index 9), FastUnstake (15), and VoterBagsList (100)
were removed from the relay chain. The relay indexer now only tracks
transfers and signed extrinsics. Added safety try-catch to staking
queries in case handlers are accidentally re-enabled.
2026-02-21 01:40:34 +03:00
pezkuwichain 151389a0cc style: fix prettier formatting across mapping files 2026-02-19 01:51:15 +03:00
pezkuwichain f717173d3d fix: use AH totalIssuance for APY, filter tiny-stake validator outliers 2026-02-18 06:13:31 +03:00
pezkuwichain b4e765ee50 fix: use relay total supply constant for AH APY calculation 2026-02-18 06:04:21 +03:00
pezkuwichain a7d11ce6a2 feat: add APY computation to AH SubQuery, clean relay SubQuery from AH pool logic 2026-02-18 06:00:45 +03:00
pezkuwichain 9c9c2a132f fix: add 'modl' prefix to pool stash derivation to match Substrate PalletId::into_sub_account_truncating 2026-02-18 05:42:45 +03:00
pezkuwichain c22f9b90e0 fix: convert Uint8Array to hex string for AccountId createType 2026-02-18 05:23:45 +03:00
pezkuwichain 358f13db50 fix: save pool stash accounts with relaychain type for wallet compat
The wallet queries activeStakers with the pool's bonded stash address
and stakingType="relaychain" (unwrapped from nomination-pool). Derive
pool stash accounts from bondedPools and save with correct type.
2026-02-18 05:18:44 +03:00
pezkuwichain 7b58fa0e4a feat: add AH GraphQL engine + block handler for pool stakers init
- Add handleBlock to query live chain state for existing pool members
- Add second GraphQL engine container for Asset Hub schema (port 3001)
- Register block handler in pezkuwi-assethub.yaml
2026-02-18 04:07:45 +03:00
pezkuwichain 1c79402d5c feat: track nomination pool members as active stakers
Add handlePoolBonded/handlePoolUnbonded handlers to Asset Hub SubQuery.
When a user bonds to a nomination pool, they are saved as an ActiveStaker
with networkId=AssetHub and stakingType=nomination-pool. This fixes the
wallet showing INACTIVE for HEZ stakers.
2026-02-18 03:14:44 +03:00