one small bug resolved

This commit is contained in:
Samyak Jain 2019-11-16 14:34:23 +05:30
parent 34cf40cb10
commit 8cd37901b9

View File

@ -498,13 +498,11 @@ contract CompMcdResolver is McdResolver {
) internal
{
address payable scdMcdMigration = InstaMcdAddress(getMcdAddresses()).migration();
TokenInterface sai = TokenInterface(getSaiAddress());
TokenInterface dai = TokenInterface(getDaiAddress());
if (dai.allowance(address(this), scdMcdMigration) < wad) {
dai.approve(scdMcdMigration, wad);
}
ScdMcdMigration(scdMcdMigration).swapDaiToSai(wad);
sai.transfer(getPoolAddress(), wad);
}
function paybackAndRedeem(uint ethAmt, uint saiAmt, bool isCompound) internal {