Skip to content

Commit

Permalink
[NES-273] [N13] Invalid balance acquisition (#116)
Browse files Browse the repository at this point in the history
* change balanceof and assetsOf functions - WIP

* correct assetsOf function
  • Loading branch information
ungaro committed Dec 12, 2024
1 parent 2905c91 commit b2efd22
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nest/src/token/BoringVaultAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,7 @@ abstract contract BoringVaultAdapter is
function balanceOf(
address account
) public view override(IERC20, ERC20Upgradeable) returns (uint256) {
BoringVaultAdapterStorage storage $ = _getBoringVaultAdapterStorage();
return $.boringVault.lens.balanceOf(account, $.boringVault.vault);
return super.balanceOf(account);
}

/**
Expand All @@ -460,8 +459,7 @@ abstract contract BoringVaultAdapter is
function assetsOf(
address account
) public view virtual override(ComponentToken) returns (uint256) {
BoringVaultAdapterStorage storage $ = _getBoringVaultAdapterStorage();
return $.boringVault.lens.balanceOfInAssets(account, $.boringVault.vault, $.boringVault.accountant);
return super.assetsOf(account);
}

// ========== METADATA OVERRIDES ==========
Expand Down

0 comments on commit b2efd22

Please sign in to comment.