Skip to content

Commit

Permalink
Merge pull request #18 from term-finance/edit-offer-gas-savings
Browse files Browse the repository at this point in the history
save gas when editing offer by only overriding amount
  • Loading branch information
aazhou1 authored Sep 9, 2024
2 parents 672462f + 321219c commit 47bb445
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Strategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -922,12 +922,8 @@ contract Strategy is BaseStrategy, Pausable, ReentrancyGuard {
);
} else {
// Edit offer, overwrite existing
termAuctionListData.offers[offerIds[0]] = PendingOffer({
repoToken: repoToken,
offerAmount: offer.amount,
termAuction: auction,
offerLocker: offerLocker
});
PendingOffer storage pendingOffer = termAuctionListData.offers[offerIds[0]];
pendingOffer.offerAmount = offer.amount;
}
}

Expand Down

0 comments on commit 47bb445

Please sign in to comment.