Skip to content

Commit

Permalink
Changed parachainStaking.staked to parachainStaking.total
Browse files Browse the repository at this point in the history
  • Loading branch information
vovunku committed Mar 28, 2024
1 parent 9949a1b commit cbf8e44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mappings/rewards/CollatorStakingRewardCalculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class CollatorStakingRewardCalculator implements RewardCalculator {
async maxApy(): Promise<number> {
let totalIssuance = await this.fetchTotalIssuance()
let round = await this.eraInfoDataSource.era()
let totalStaked = await this.fetchTotalStaked(round)
let totalStaked = await this.fetchTotalStaked()
let collators = await this.eraInfoDataSource.eraStakers()
let collatorCommission = await this.fetchCommission()
let parachainBondPercent = await this.fetchParachainBondPercent()
Expand Down Expand Up @@ -72,8 +72,8 @@ export class CollatorStakingRewardCalculator implements RewardCalculator {
}
}

private async fetchTotalStaked(round: number): Promise<Big> {
const totalStake = await api.query.parachainStaking.staked(round)
private async fetchTotalStaked(): Promise<Big> {
const totalStake = await api.query.parachainStaking.total()
return BigFromINumber(totalStake)
}

Expand Down

0 comments on commit cbf8e44

Please sign in to comment.