Skip to content

Commit

Permalink
undo the the return loan feature to reduce the gas
Browse files Browse the repository at this point in the history
  • Loading branch information
androolloyd committed Dec 22, 2023
1 parent 741bea0 commit 489d9a7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Starport.sol
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ contract Starport is PausableNonReentrant {
CaveatEnforcer.SignedCaveats calldata borrowerCaveat,
CaveatEnforcer.SignedCaveats calldata lenderCaveat,
Starport.Loan memory loan
) external payable pausableNonReentrant returns (Starport.Loan memory) {
) external payable pausableNonReentrant {
// Cache the addresses
address borrower = loan.borrower;
address issuer = loan.issuer;
Expand Down Expand Up @@ -240,7 +240,6 @@ contract Starport is PausableNonReentrant {
// Sets originator and start time
_issueLoan(loan);
_callCustody(loan);
return loan;
}

/**
Expand All @@ -256,7 +255,7 @@ contract Starport is PausableNonReentrant {
Starport.Loan memory loan,
bytes calldata pricingData,
bytes calldata extraData
) external pausableNonReentrant returns (Starport.Loan memory) {
) external pausableNonReentrant {
if (loan.start == block.timestamp) {
revert InvalidLoan();
}
Expand Down Expand Up @@ -294,7 +293,6 @@ contract Starport is PausableNonReentrant {

// Sets originator and start time
_issueLoan(loan);
return loan;
}

/**
Expand Down Expand Up @@ -346,7 +344,8 @@ contract Starport is PausableNonReentrant {
/**
* @dev Sets fee overrides for specific tokens, only owner can call
* @param token The token to override
* @param overrideValue The new value in WAD denomination to override(1e17 = 10%)
* @param overrideValue The new value in decimals base denomination
* to override eg if token has 18 decimals (1e17 = 10%)
* @param enabled Whether or not the override is enabled
*/
function setFeeOverride(address token, uint88 overrideValue, bool enabled) external onlyOwner {
Expand Down

0 comments on commit 489d9a7

Please sign in to comment.