diff --git a/test/foundry/integration/ynLSD.t.sol b/test/foundry/integration/ynLSD.t.sol index 8aaaecd62..3eaeda8cf 100644 --- a/test/foundry/integration/ynLSD.t.sol +++ b/test/foundry/integration/ynLSD.t.sol @@ -220,11 +220,10 @@ contract ynLSDAssetTest is IntegrationBaseTest { // Obtain STETH (bool success, ) = chainAddresses.lsd.STETH_ADDRESS.call{value: amount + 1}(""); require(success, "ETH transfer failed"); - uint256 balance = asset.balanceOf(address(this)); - assertEq(balance, amount, "Amount not received"); + // Note, STETH returns aprx 9.987e17 SETH for 1 ether uint256 ethAmount = ynlsd.convertToETH(asset, amount); - assertTrue(amount - ethAmount < 1e15, "ETH amount should be greater than zero"); + assertTrue(compareWithThreshold(amount, ethAmount, 9.987e17), "convertToEth does not match expected value"); } }