Skip to content

Commit 76d3c80

Browse files
committed
fix: Broken LSD tests
1 parent 3061501 commit 76d3c80

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/foundry/integration/ynLSD.t.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ contract ynLSDAssetTest is IntegrationBaseTest {
5656
(bool success, ) = chainAddresses.lsd.STETH_ADDRESS.call{value: amount + 1}("");
5757
require(success, "ETH transfer failed");
5858
uint256 balance = stETH.balanceOf(address(this));
59-
assertEq(balance, amount, "Amount not received");
59+
assertEq(compareWithThreshold(balance, amount, 1), true, "Amount not received");
6060

6161
uint depositAmount = 15 ether;
6262

@@ -76,7 +76,7 @@ contract ynLSDAssetTest is IntegrationBaseTest {
7676
(bool success, ) = chainAddresses.lsd.STETH_ADDRESS.call{value: amount + 1}("");
7777
require(success, "ETH transfer failed");
7878
uint256 balance = stETH.balanceOf(address(this));
79-
assertEq(balance, amount, "Amount not received");
79+
assertEq(compareWithThreshold(balance, amount, 1), true, "Amount not received");
8080

8181
stETH.approve(address(ynlsd), 32 ether);
8282
uint256 depositAmountOne = 5 ether;
@@ -326,7 +326,7 @@ contract ynLSDAdminTest is IntegrationBaseTest {
326326

327327
function testRetrieveAssetsSuccess() public {
328328
IERC20 asset = IERC20(chainAddresses.lsd.STETH_ADDRESS);
329-
uint256 amount = 64;
329+
uint256 amount = 64 ether;
330330

331331
vm.prank(actors.STAKING_NODE_CREATOR);
332332
ynlsd.createLSDStakingNode();
@@ -337,7 +337,7 @@ contract ynLSDAdminTest is IntegrationBaseTest {
337337
(bool success, ) = chainAddresses.lsd.STETH_ADDRESS.call{value: amount + 1}("");
338338
require(success, "ETH transfer failed");
339339
uint256 balance = asset.balanceOf(address(this));
340-
assertEq(balance, amount, "Amount not received");
340+
assertEq(compareWithThreshold(balance, amount, 1), true, "Amount not received");
341341

342342
asset.approve(address(ynlsd), amount);
343343
ynlsd.deposit(asset, amount, address(this));

0 commit comments

Comments
 (0)