Skip to content

Remove redundant currentTime variable in SignedExclusiveSwap#323

Merged
moodysalem merged 2 commits intosigned-exclusive-swapfrom
copilot/sub-pr-319
Feb 24, 2026
Merged

Remove redundant currentTime variable in SignedExclusiveSwap#323
moodysalem merged 2 commits intosigned-exclusive-swapfrom
copilot/sub-pr-319

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

currentTime was redundantly assigned uint32(block.timestamp) mid-function when currentTimestamp already held the same value from earlier in the same call.

Change

  • Removed uint32 currentTime = uint32(block.timestamp) and replaced all usages with the existing currentTimestamp variable throughout the fee accumulation block.
// Before
uint32 currentTimestamp = uint32(block.timestamp);
// ... signature/deadline checks using currentTimestamp ...
uint32 currentTime = uint32(block.timestamp); // redundant
if (state.lastUpdateTime() != currentTime) {
    ...
    state = state.withLastUpdateTime(currentTime);
}

// After
uint32 currentTimestamp = uint32(block.timestamp);
// ... signature/deadline checks ...
if (state.lastUpdateTime() != currentTimestamp) {
    ...
    state = state.withLastUpdateTime(currentTimestamp);
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: moodysalem <7897876+moodysalem@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP address feedback on signed exclusive swap extension PR Remove redundant currentTime variable in SignedExclusiveSwap Feb 24, 2026
@moodysalem moodysalem marked this pull request as ready for review February 24, 2026 14:22
@moodysalem moodysalem merged commit fa9eb3f into signed-exclusive-swap Feb 24, 2026
@moodysalem moodysalem deleted the copilot/sub-pr-319 branch February 24, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants