From 98d90e775de3421aecec9afcdc4a167046aa803c Mon Sep 17 00:00:00 2001 From: Aayush Gupta <60979345+AAYUSH-GUPTA-coder@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:23:04 +0800 Subject: [PATCH] added isAllowedToken, moreThanZero modifier to depositCollateralAndMintDsc() --- src/DSCEngine.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DSCEngine.sol b/src/DSCEngine.sol index 7f1c15d..38edf4d 100644 --- a/src/DSCEngine.sol +++ b/src/DSCEngine.sol @@ -145,6 +145,9 @@ contract DSCEngine is ReentrancyGuard { uint256 amountDscToMint ) external + isAllowedToken(tokenCollateralAddress) + moreThanZero(amountCollateral) + moreThanZero(amountDscToMint) { depositCollateral(tokenCollateralAddress, amountCollateral); mintDsc(amountDscToMint);