From 4199418e06334f8c8dd952a295d94417ec7525de Mon Sep 17 00:00:00 2001 From: danoctavian Date: Wed, 23 Oct 2024 02:51:17 +0300 Subject: [PATCH] add correct negation --- src/ynEIGEN/ynEigen.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ynEIGEN/ynEigen.sol b/src/ynEIGEN/ynEigen.sol index 23b81c2b8..a0e4760c8 100644 --- a/src/ynEIGEN/ynEigen.sol +++ b/src/ynEIGEN/ynEigen.sol @@ -230,7 +230,7 @@ contract ynEigen is IynEigen, ynBase, ReentrancyGuardUpgradeable, IynEigenEvents } function convertToAssets(IERC20 asset, uint256 shares) public view returns (uint256) { - if (assetIsSupported(asset)) { + if (!assetIsSupported(asset)) { revert UnsupportedAsset(asset); } return assetRegistry.convertFromUnitOfAccount(asset, _convertToAssets(shares, Math.Rounding.Floor));