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

[#1235] add /transaction/watch endpoint & background tx status process #1304

Conversation

jankun4
Copy link
Contributor

@jankun4 jankun4 commented Jun 16, 2024

List of changes

Added

  • /transaction/watch/ websocket endpoint
  • background transaction status process, that looks for watched transactions and sends {"status": "confirmed"} via websocket when transaction is found. This process works in iterations, once per 20 seconds.

IMPORTANT!!!

each /transaction/watch request stores a UUID in Redis in database number 1 (not 0)
this redis store, together with in-memory uuid to WebSocket.Connection map is used to notify user, that transaction of interest is confirmed.

Checklist

  • related issue
  • My changes generate no new warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the changelog
  • I have added tests that prove my fix is effective or that my feature works

@jankun4 jankun4 marked this pull request as ready for review June 16, 2024 21:33
@jankun4 jankun4 requested review from MSzalowski and Ryun1 as code owners June 16, 2024 21:33
Copy link
Contributor

@MSzalowski MSzalowski left a comment

Choose a reason for hiding this comment

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

Could you please verify&fix if possible backend actions?

@MSzalowski MSzalowski self-requested a review June 17, 2024 10:45
@MSzalowski MSzalowski self-requested a review June 17, 2024 10:47
@MSzalowski
Copy link
Contributor

Notes:

  • To validate acking the message
  • To validate timeout when listening to the non-existing txhash

CC @jankun4

@jankun4 jankun4 force-pushed the 1235-tech-debt-provide-event-based-functionality-for-confirmation-of-the-transactions branch from 10784a6 to 0421ca6 Compare June 23, 2024 18:28
@jankun4 jankun4 force-pushed the 1235-tech-debt-provide-event-based-functionality-for-confirmation-of-the-transactions branch from 4769a75 to 3d4f165 Compare July 1, 2024 11:57
@MSzalowski MSzalowski merged commit 409467d into develop Jul 1, 2024
5 of 7 checks passed
@MSzalowski MSzalowski deleted the 1235-tech-debt-provide-event-based-functionality-for-confirmation-of-the-transactions branch July 1, 2024 14:09
MSzalowski added a commit that referenced this pull request Jul 1, 2024
…vide-event-based-functionality-for-confirmation-of-the-transactions"

This reverts commit 409467d, reversing
changes made to 3db9567.
MSzalowski added a commit that referenced this pull request Jul 2, 2024
…atch

Revert "Merge pull request #1304 from IntersectMBO/1235-tech-debt-provide-event-based-functionality-for-confirmation-of-the-transactions"
@MSzalowski MSzalowski restored the 1235-tech-debt-provide-event-based-functionality-for-confirmation-of-the-transactions branch July 2, 2024 11:53
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.

[Tech Debt] Provide event based functionality for confirmation of the transactions
2 participants