Skip to content

Conversation

@sinzii
Copy link
Member

@sinzii sinzii commented Dec 14, 2025

Verifying CI

status.type === 'Drop'
) {
unsub?.().catch(noop);
}
Copy link

Choose a reason for hiding this comment

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

Bug: Callback promise rejection becomes unhandled

In send, the subscription callback is invoked without await/return. If callback throws or returns a rejected promise, the failure is detached from the RPC update handler, increasing the chance of unhandled promise rejections and also skipping the later cleanup path (like unsub?.()), leaving the watch active.

Fix in Cursor Fix in Web

deferTx.resolve(x);
}
})
.catch(deferTx.reject);
Copy link

Choose a reason for hiding this comment

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

Bug: Auto-unsubscribe can miss early terminal status

unsub is assigned asynchronously in the .then after author_submitAndWatchExtrinsic, but the terminal-state cleanup calls unsub?.() inside the status callback. If a terminal status arrives before .then runs (provider timing differences), unsub stays undefined and the subscription may remain open indefinitely.

Fix in Cursor Fix in Web

@sinzii sinzii closed this Dec 14, 2025
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