Cyfrin / foundry-defi-stablecoin-cu

250 stars 117 forks source link

fixed call to calculateHealthFactor in tests #22

Closed ShayanShamsi closed 1 year ago

ShayanShamsi commented 1 year ago

calculateHealthFactor takes in the totalDscMinted as the first argument and collateralValueInUsd as the second argument. The call to calculateHealthFactor had this order switched. The tests were still passing since both the arguments had equal values in our case. However, I thought it would be better if we pass the arguments to the appropriate parameters so I have fixed the order of the arguments. The tests still pass after the modification.

Please let me know in case I have made any misinterpretations. Thanks!

PatrickAlphaC commented 1 year ago

whoops, nice find!