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

feature(locksmith): Decouple event creation from user connection state #15249

Merged
merged 25 commits into from
Dec 17, 2024

Conversation

0xTxbi
Copy link
Member

@0xTxbi 0xTxbi commented Dec 6, 2024

Description

This PR introduces a more reliable process for event creation by decoupling it from the user’s connection state during lock deployment. The previous implementation depended on the user witnessing the deployment, which was fragile in cases of disconnection or tab closure. The updated logic ensures events are consistently created regardless of the user’s connection status.

Issues

Fixes #15243
Refs #15243

Checklist:

  • 1 PR, 1 purpose: my Pull Request applies to a single purpose
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the docs to reflect my changes if applicable
  • I have added tests (and stories for frontend components) that prove my fix is effective or that my feature works
  • I have performed a self-review of my own code
  • If my code involves visual changes, I am adding applicable screenshots to this thread

@0xTxbi 0xTxbi requested a review from julien51 December 6, 2024 19:24
@cla-bot cla-bot bot added the cla-signed label Dec 6, 2024
@0xTxbi 0xTxbi closed this Dec 10, 2024
@0xTxbi 0xTxbi force-pushed the async-event-creation branch from fb4c227 to 94279c0 Compare December 10, 2024 17:59
@0xTxbi 0xTxbi reopened this Dec 10, 2024
Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unlock-storybook ⬜️ Ignored (Inspect) Visit Preview Dec 17, 2024 9:42am

@0xTxbi 0xTxbi marked this pull request as ready for review December 10, 2024 18:03
@0xTxbi 0xTxbi changed the title feature(unlock-app): Decouple event creation from user connection state feature(locksmith): Decouple event creation from user connection state Dec 13, 2024
// This was a creation!
if (created) {
// Only send email if event is deployed
if (created && event.status === EventStatus.DEPLOYED) {
Copy link
Member

Choose a reason for hiding this comment

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

ok let's make sure the email is still sent after it was deployed when this is happening later

Copy link
Member Author

Choose a reason for hiding this comment

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

sure thing! good catch!

@0xTxbi 0xTxbi merged commit fe2087e into master Dec 17, 2024
12 checks passed
@0xTxbi 0xTxbi deleted the async-event-creation branch December 17, 2024 09:46
blahkheart pushed a commit to blahkheart/unlock that referenced this pull request Dec 21, 2024
unlock-protocol#15249)

* update model

* add migration script

* add event deployment status to types package

* update event operations

* update event controller

* update event route

* update unlockjs package

* draft dashboard utilisation

* update unlockjs

* update operation

* update controller

* update model

* update route

* remove types

* update controller

* remove deprecated function

* update controller

* cleanup

* remove deployment queue

* linting

* more cleanup

* update to use package types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better handling of async event creation
2 participants