Skip to content

Conversation

@oscarwroche
Copy link
Contributor

@oscarwroche oscarwroche commented Jan 27, 2026

Explanation

  • Extract shared polling lifecycle into BasePoller and split intent vs bridge logic into IntentTxPoller and
    BridgeTxPoller.
  • Keep BridgeStatusController’s public API unchanged; #fetchBridgeTxStatus now delegates to the appropriate poller.
  • Add focused tests to cover new poller paths, intent approval flow, and edge cases to preserve coverage.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Introduces a shared polling framework and splits provider-specific logic.

  • Extracts common lifecycle into BasePoller; adds BridgeTxPoller and IntentTxPoller with a normalized PollerContext and hooks (fetch, afterUpdate, onFinalStatus, onError).
  • BridgeStatusController.#fetchBridgeTxStatus now delegates to the appropriate poller; removes inline intent/bridge status handling and related imports, preserving the public API.
  • Pollers handle status updates, completion timing, attempts/backoff, event tracking, TC sync, and publishing destinationTransactionCompleted.
  • Adds comprehensive tests: new utils/polling/*.test.ts, expanded intent flow tests (approval success/failure, history update failure), and bridge polling edge cases (missing srcTxHash, validation failures, featureId tracking skip, restart/stop polling semantics).
  • Minor test harness updates (configurable approval status) and a guard to skip rekeying when pre-submission history is missing.

Written by Cursor Bugbot for commit 19a8816. This will update automatically on new commits. Configure here.

@oscarwroche oscarwroche requested a review from a team as a code owner January 27, 2026 15:45
@oscarwroche oscarwroche force-pushed the refactor/intent-orders-refactoring branch from 60e15e2 to 2d3bf7f Compare January 27, 2026 15:46
@oscarwroche oscarwroche force-pushed the refactor/intent-orders-refactoring branch 2 times, most recently from 41f9775 to 9f7dff0 Compare January 27, 2026 16:32
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@oscarwroche oscarwroche force-pushed the refactor/intent-orders-refactoring branch from aa99f5e to 053d848 Compare January 27, 2026 17:45
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.

2 participants