You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is a cash-out in between the prepareDecreaseHardDeposit and decreaseHardDeposit, the line hardDeposit.amount = hardDeposit.amount.sub(hardDeposit.decreaseAmount); in decreaseHardDeposit might throw and decreasing the hardDeposit can be effectively blocked temporarily.
Proposed solution: if decreaseAmount is more than amount, set the hardDeposits to 0.
As an extra benefit: this makes the require(decreaseAmount <= hardDeposit.amount) in prepareDecreaseHardDeposit redundant. @ralph-pichler
The text was updated successfully, but these errors were encountered:
If there is a cash-out in between the prepareDecreaseHardDeposit and decreaseHardDeposit, the line
hardDeposit.amount = hardDeposit.amount.sub(hardDeposit.decreaseAmount);
in decreaseHardDeposit might throw and decreasing the hardDeposit can be effectively blocked temporarily.Proposed solution: if decreaseAmount is more than amount, set the hardDeposits to 0.
As an extra benefit: this makes the require(decreaseAmount <= hardDeposit.amount) in prepareDecreaseHardDeposit redundant.
@ralph-pichler
The text was updated successfully, but these errors were encountered: