diff --git a/contracts/libraries/logic/ValidationLogic.sol b/contracts/libraries/logic/ValidationLogic.sol index 6a504659..dc505afa 100644 --- a/contracts/libraries/logic/ValidationLogic.sol +++ b/contracts/libraries/logic/ValidationLogic.sol @@ -65,7 +65,7 @@ library ValidationLogic { GenericLogic.balanceDecreaseAllowed( reserveAddress, msg.sender, - userBalance, + amount, reservesData, userConfig, reserves, diff --git a/test/helpers/scenarios/withdraw.json b/test/helpers/scenarios/withdraw.json index 4a679b22..436984fc 100644 --- a/test/helpers/scenarios/withdraw.json +++ b/test/helpers/scenarios/withdraw.json @@ -342,6 +342,20 @@ "expected": "success" } ] + }, + { + "description": "Users 1 tries to withdraw 0.05 WETH, which does not bring the HF below 1", + "actions": [ + { + "name": "withdraw", + "args": { + "reserve": "WETH", + "amount": "0.05", + "user": "1" + }, + "expected": "success" + } + ] } ] }