From b2efd226ac1192e14c56922ea8603d5fbd2190cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alp=20G=C3=BCneysel?= Date: Mon, 9 Dec 2024 19:47:02 -0500 Subject: [PATCH] [NES-273] [N13] Invalid balance acquisition (#116) * change balanceof and assetsOf functions - WIP * correct assetsOf function --- nest/src/token/BoringVaultAdapter.sol | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nest/src/token/BoringVaultAdapter.sol b/nest/src/token/BoringVaultAdapter.sol index 2407ad46..1bc46290 100644 --- a/nest/src/token/BoringVaultAdapter.sol +++ b/nest/src/token/BoringVaultAdapter.sol @@ -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); } /** @@ -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 ==========