Skip to content
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

feat: disable request queue #4447

Merged
merged 50 commits into from
May 7, 2024
Merged

feat: disable request queue #4447

merged 50 commits into from
May 7, 2024

Conversation

ganchoradkov
Copy link
Member

@ganchoradkov ganchoradkov commented Apr 15, 2024

Description

Added new init param signConfig with initial disableRequestQueue parameter. This option allows wallets to disable the session request queue if they wish.
Additionally, added a few improvements to connection handling because if several days long socket hang up issues in CI such as

  • always creating new ws instance when attempting to connect
  • proper cleanup of ping timers when connection is closed intentionally

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
canary - 2.12.2-req-q.0

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.

@arein
Copy link
Member

arein commented Apr 17, 2024

seems like there's also a bug fix with requestsInFlight.clear()?

@ganchoradkov
Copy link
Member Author

seems like there's also a bug fix with requestsInFlight.clear()?

I'm testing what might be causing the network drops

packages/core/src/controllers/relayer.ts Outdated Show resolved Hide resolved
packages/core/src/controllers/relayer.ts Outdated Show resolved Hide resolved
packages/core/src/controllers/relayer.ts Outdated Show resolved Hide resolved
Comment on lines +63 to +65
type SignConfig = {
disableRequestQueue?: boolean;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick, optional: shouldn't this be in types?

Copy link
Member Author

Choose a reason for hiding this comment

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

what do you mean? It is in packages/types/src/sign-client/client.ts

Copy link
Member

@bkrem bkrem left a comment

Choose a reason for hiding this comment

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

Thanks for the solid test coverage on the new option 🙏

packages/core/src/controllers/relayer.ts Outdated Show resolved Hide resolved
packages/core/src/controllers/relayer.ts Outdated Show resolved Hide resolved
packages/sign-client/src/controllers/engine.ts Outdated Show resolved Hide resolved
packages/sign-client/test/shared/helpers.ts Outdated Show resolved Hide resolved
Gancho Radkov added 2 commits April 29, 2024 11:21
…/walletconnect-monorepo into feat/disable-request-queue
@ganchoradkov ganchoradkov merged commit 6bc470e into v2.0 May 7, 2024
9 checks passed
@ganchoradkov ganchoradkov deleted the feat/disable-request-queue branch May 7, 2024 10:32
@ganchoradkov ganchoradkov mentioned this pull request May 8, 2024
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants