Skip to content

Commit 757af4b

Browse files
Use myDebt() to check debt amount before disabling controller
1 parent cc0bfcf commit 757af4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MaglevBase.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ abstract contract MaglevBase is IMaglevBase, EVCUtil {
178178
vault, myAccount, 0, abi.encodeCall(IBorrowing.repayWithShares, (type(uint256).max, myAccount))
179179
);
180180

181-
if (debt <= amount) {
181+
if (myDebt(vault) == 0) {
182182
IEVC(evc).call(vault, myAccount, 0, abi.encodeCall(IRiskManager.disableController, ()));
183183
}
184184
}

0 commit comments

Comments
 (0)