Skip to content

Commit

Permalink
fix: Returns zero balances at GhoAToken (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmtzinf authored Jan 25, 2023
1 parent 52e9633 commit e6c8cd3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/contracts/facilitators/aave/tokens/GhoAToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,12 @@ contract GhoAToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base
override(IncentivizedERC20, IERC20)
returns (uint256)
{
return super.balanceOf(user).rayMul(POOL.getReserveNormalizedIncome(_underlyingAsset));
return 0;
}

/// @inheritdoc IERC20
function totalSupply() public view virtual override(IncentivizedERC20, IERC20) returns (uint256) {
uint256 currentSupplyScaled = super.totalSupply();

if (currentSupplyScaled == 0) {
return 0;
}

return currentSupplyScaled.rayMul(POOL.getReserveNormalizedIncome(_underlyingAsset));
return 0;
}

/// @inheritdoc IAToken
Expand Down

0 comments on commit e6c8cd3

Please sign in to comment.