Skip to content

Commit

Permalink
test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
girazoki committed Oct 24, 2023
1 parent c264068 commit e84ee7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/suites/dev-tanssi/staking/test_staking_rewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ describeSuite({

// First, manual rewards
const delegatorManualRewards = (totalManual * delegatorRewards) / totalBacked;
// Check its
const delegatorManualRewardsPerShare = delegatorManualRewards / totalManualShareSupply;
const realDistributedManualDelegatorRewards = delegatorManualRewardsPerShare * totalManualShareSupply;

Expand Down
4 changes: 2 additions & 2 deletions test/util/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function fetchRewardStakingDelegators(events: EventRecord[] = []) {
const filtered = filterAndApply(
events,
"pooledStaking",
["RewardedCollator"],
["RewardedDelegators"],
({ event }: EventRecord) =>
event.data as unknown as { collator: AccountId32; autoCompoundingRewards: u128; manualClaimRewards: u128 }
);
Expand All @@ -132,7 +132,7 @@ export function fetchRewardStakingCollators(events: EventRecord[] = []) {
const filtered = filterAndApply(
events,
"pooledStaking",
["RewardedDelegators"],
["RewardedCollator"],
({ event }: EventRecord) =>
event.data as unknown as { collator: AccountId32; autoCompoundingRewards: u128; manualClaimRewards: u128 }
);
Expand Down

0 comments on commit e84ee7d

Please sign in to comment.