Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DSCEngineTest.t.sol - testCanRedeemCollateral() #114

Merged
merged 1 commit into from
Feb 23, 2025

Conversation

5hr1ganesh
Copy link
Contributor

@5hr1ganesh 5hr1ganesh commented Feb 16, 2025

in the previous testCanRedeemCollateral() function it was being asserted that userBalance = amountCollateral assertEq(userBalance, amountCollateral) but that test is bound to fail because the user only had amountCollateral = 10 ether deposited as collateral and after calling the dsce.redeemCollateral(weth, amountCollateral); LOC there's not going to be any collateral left in the DSCEngine. The modified test proves that amountCollateral was deposited and then redeemed.

in the previous testCanRedeemCollateral() function it was being asserted that userBalance = amountCollateral `assertEq(userBalance, amountCollateral)` but that test is bound to fail because the `user` only had `amountCollateral = 10 ether` deposited as collateral and after calling the `dsce.redeemCollateral(weth, amountCollateral);` LOC there's not going to be any collateral left in the DSCEngine.
@EngrPips
Copy link

Hello @5hr1ganesh, Thanks for this contribution and this will be attended to appropriately as soon as possible.

@PatrickAlphaC PatrickAlphaC merged commit 145bf8b into Cyfrin:main Feb 23, 2025
1 check failed
@PatrickAlphaC
Copy link
Member

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants