Skip to content

Commit

Permalink
Merge pull request #35 from onomyprotocol/v0.45.16-ics-onomy-dev
Browse files Browse the repository at this point in the history
Add mistakenly omitted commit
  • Loading branch information
cgdusek committed Aug 22, 2023
2 parents 6a3986f + 13ddd90 commit 3949f4f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion x/staking/keeper/pool.go
Expand Up @@ -64,7 +64,14 @@ func (k Keeper) TotalBondedTokens(ctx sdk.Context) sdk.Int {

// StakingTokenSupply staking tokens from the total supply
func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdk.Int {
return k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)).Amount
stakeSupply := k.bankKeeper.GetSupply(ctx, k.BondDenom(ctx)).Amount
daoAddr := k.authKeeper.GetModuleAddress("dao")
if daoAddr != nil {
daoSupply := k.bankKeeper.GetBalance(ctx, daoAddr, k.BondDenom(ctx))
stakeSupply = stakeSupply.Sub(daoSupply.Amount)
}

return stakeSupply
}

// BondedRatio the fraction of the staking tokens which are currently bonded
Expand Down

0 comments on commit 3949f4f

Please sign in to comment.