Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NES-273] [N13] Invalid balance acquisition #116

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 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,9 @@ 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);
// Convert the user's shares to assets using the conversion rate
uint256 shares = super.balanceOf(account);
ungaro marked this conversation as resolved.
Show resolved Hide resolved
return convertToAssets(shares);
}

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