Skip to content

Commit

Permalink
Merge pull request #48 from novasamatech/fix/staked_to_total
Browse files Browse the repository at this point in the history
Staked to total
  • Loading branch information
ERussel authored Mar 29, 2024
2 parents a648726 + cbf8e44 commit bd19d72
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 bd19d72

Please sign in to comment.