Skip to content

Commit

Permalink
ABDK CVF-69 (#330)
Browse files Browse the repository at this point in the history
* ABDK CVF-69

* add another else statement
  • Loading branch information
dianakocsis authored Sep 2, 2024
1 parent 2f9b2d2 commit b6d07dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/base/DeltaResolver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,17 @@ abstract contract DeltaResolver is ImmutableState {
return currency.balanceOfSelf();
} else if (amount == ActionConstants.OPEN_DELTA) {
return _getFullDebt(currency);
} else {
return amount;
}
return amount;
}

/// @notice Calculates the amount for a take action
function _mapTakeAmount(uint256 amount, Currency currency) internal view returns (uint256) {
if (amount == ActionConstants.OPEN_DELTA) {
return _getFullCredit(currency);
} else {
return amount;
}
return amount;
}
}

0 comments on commit b6d07dc

Please sign in to comment.