From f534d3f7638b584c64cebb1478656c848795c24c Mon Sep 17 00:00:00 2001 From: SidestreamColdMelon Date: Thu, 17 Oct 2024 13:48:37 +0200 Subject: [PATCH] fix fragile freeSky test --- src/DssSpell.t.base.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DssSpell.t.base.sol b/src/DssSpell.t.base.sol index bddbf099..b68430b9 100644 --- a/src/DssSpell.t.base.sol +++ b/src/DssSpell.t.base.sol @@ -1374,8 +1374,8 @@ contract DssSpellTestBase is Config, DssTest { engine.lockSky(address(this), 0, skyAmt, 0); assertEq(mkr.balanceOf(p.engine), initialEngineBalance + lockAmt, "checkLockstakeIlkIntegration/LockAndFreeSky/invalid-locked-mkr-balance"); engine.freeSky(address(this), 0, address(this), skyAmt); - uint256 exitFee = skyAmt * p.fee / 100_00; - assertEq(sky.balanceOf(address(this)), skyAmt - exitFee, "checkLockstakeIlkIntegration/LockAndFreeSky/invalid-unlocked-balance"); + uint256 exitFee = lockAmt * p.fee / 100_00 * afterSpell.sky_mkr_rate; + assertGe(sky.balanceOf(address(this)), skyAmt - exitFee, "checkLockstakeIlkIntegration/LockAndFreeSky/invalid-unlocked-balance"); vm.revertTo(snapshot); } // Check drawing and wiping