Skip to content

fix: delete expirer entry after proposal response #6738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 11, 2025

Conversation

ganchoradkov
Copy link
Member

Description

Sign-client now correctly clears the expirer entry when it deletes a proposal. This was resulting in an annoying error log as the expirer couldn't find its target since the proposal was already deleted

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Draft PR (breaking/non-breaking change which needs more work for having a proper functionality [Mark this PR as ready to review only when completely ready])
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How has this been tested?

tests, dogfooding

Checklist

  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Additional Information (Optional)

Please include any additional information that may be useful for the reviewer.

@ganchoradkov ganchoradkov requested a review from Copilot June 9, 2025 10:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where the expirer entry wasn’t cleared after a session proposal was deleted, preventing error logs due to missing targets.

  • Added expirer.del(id) calls in both accept and reject flows in the engine controller
  • Extended integration tests to assert expirer.keys state after proposal deletion
  • Updated the release changeset to document the patch

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/sign-client/src/controllers/engine.ts Call this.client.core.expirer.del(id) immediately after deleting a proposal ID
packages/sign-client/test/sdk/client.spec.ts Added assertions on clients.A.core.expirer.keys and their lengths in the integration test
.changeset/plain-paws-happen.md Added patch notes for deleting expirer entries after proposal response
Comments suppressed due to low confidence (2)

packages/sign-client/test/sdk/client.spec.ts:96

  • Consider adding an assertion to verify that the specific proposal ID is removed from expirer.keys (e.g., expect(clients.A.core.expirer.keys).not.to.include(id)) to ensure the entry was cleared.
expect(clients.A.core.expirer.keys).to.deep.equal(clients.B.core.expirer.keys);

packages/sign-client/test/sdk/client.spec.ts:100

  • Consider adding a separate test case for the proposal rejection flow to ensure the expirer entry is also deleted in reject scenarios.
await deleteClients(clients);

@ganchoradkov ganchoradkov requested review from Cali93 and bkrem June 11, 2025 07:47
@ganchoradkov ganchoradkov merged commit 59aee66 into v2.0 Jun 11, 2025
24 of 26 checks passed
@ganchoradkov ganchoradkov deleted the fix/proposal-expiry-del branch June 11, 2025 08:29
@ganchoradkov ganchoradkov restored the fix/proposal-expiry-del branch June 12, 2025 11:00
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