Skip to content

Conversation

@tmns
Copy link
Contributor

@tmns tmns commented Dec 26, 2025

It's been reported that order confirmation logic is taking longer than it should to initiate. After some debugging, looks like it's specific to Swift orders, and arises from the confirmed event lagging to fire.

Currently we use an initial fetch & WS to watch for the order confirmation and relay the confirmed event. I think it's possible that sometimes something like the following happens:

  1. Initial RPC fetch runs immediately. At this point, possible that the order has not been confirmed yet (i.e. too early).
  2. WS sub waits for account changes.
  3. WS fails/misses the event for some reason.
  4. Final RPC fetch after the full timeout.

This PR in turn adds polling in addition to the WS sub, so that in case something like the above happens, we can pick up the event without waiting for the full timeout.

@tmns tmns self-assigned this Dec 26, 2025
@tmns tmns force-pushed the methias/swift-client-polling-fallback branch from 8599b7d to 6331ae5 Compare December 27, 2025 01:00
@ChesterSim ChesterSim merged commit b3e77d9 into master Dec 29, 2025
1 check failed
@ChesterSim ChesterSim deleted the methias/swift-client-polling-fallback branch December 29, 2025 06:12
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.

3 participants