From 55ee422e7badafa52bd60bfa5ea9a31f3579078e Mon Sep 17 00:00:00 2001 From: Samyak Jain Date: Wed, 12 Jun 2019 14:44:21 +0530 Subject: [PATCH] withdraw DAI require statement --- contracts/bridges/MakerCompound.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/bridges/MakerCompound.sol b/contracts/bridges/MakerCompound.sol index b686ae4..6376985 100644 --- a/contracts/bridges/MakerCompound.sol +++ b/contracts/bridges/MakerCompound.sol @@ -96,6 +96,7 @@ contract Bridge is Helper { } function withdrawDAI(uint amt) public { + require(deposited[msg.sender] != 0, "Nothing to Withdraw"); CTokenInterface cToken = CTokenInterface(cDaiAdd); uint withdrawAmt = wdiv(amt, cToken.exchangeRateCurrent()); uint daiAmt = amt; @@ -115,7 +116,7 @@ contract Bridge is Helper { } function withdrawCDAI(uint amt) public { - require(deposited[msg.sender] != 0, "something went wrong"); + require(deposited[msg.sender] != 0, "Nothing to Withdraw"); CTokenInterface cToken = CTokenInterface(cDaiAdd); uint withdrawAmt = amt; if (withdrawAmt > deposited[msg.sender]) {