Skip to content

fix: handle async tx submission result via socket events#870

Merged
guimroque merged 1 commit intostagingfrom
fix/async-tx-socket-update
Apr 8, 2026
Merged

fix: handle async tx submission result via socket events#870
guimroque merged 1 commit intostagingfrom
fix/async-tx-socket-update

Conversation

@guimroque
Copy link
Copy Markdown
Member

Summary

  • Handle minimal transaction payload from worker socket events without corrupting React Query cache
  • Resolve loading toast via socket when worker reports final tx status (SUCCESS/FAILED)
  • Invalidate transaction queries on worker updates to trigger API refetch with full data

Context

Transaction submission moved to async Bull queue in the API. The worker sends socket events with minimal data (id, status, hash, predicateId). These changes ensure the frontend handles this correctly without breaking UX.

Changes

  • methods.ts: guard against cache replacement with partial tx data
  • useTransactionsSocketListener.ts: invalidate queries on minimal worker payload
  • useSendTransaction.ts: listen for socket result to resolve loading toast

@guimroque guimroque merged commit e727c85 into staging Apr 8, 2026
1 check was pending
@guimroque guimroque deleted the fix/async-tx-socket-update branch April 8, 2026 19:34
guimroque added a commit that referenced this pull request Apr 8, 2026
…-update"

This reverts commit e727c85, reversing
changes made to 6064416.
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.

1 participant