Describe the bug
When a user places a buy order using the pay-with-any-token flow, the PREDICT_TRADE_TRANSACTION analytics event with status: submitted is never fired for the deposit transition (PAY_WITH_ANY_TOKEN → DEPOSITING). The direct balance flow correctly fires this event, but the deposit path returns early before reaching the existing tracking call, leaving a gap in the analytics funnel.
Expected behavior
The deposit flow should fire a PREDICT_TRADE_TRANSACTION event with status: submitted when transitioning to DEPOSITING state, matching the behavior of the direct order path. The event should also include the predict_token_address property identifying which external token the user selected for payment.
Screenshots/Recordings
No response
Steps to reproduce
- Enable the predictWithAnyToken feature flag
- Open the Predict buy screen for any market
- Select an external payment token (e.g. MATIC, USDC on Polygon)
- Enter a bet amount and tap Confirm
- Observe that no PREDICT_TRADE_TRANSACTION event with status: submitted is fired when the order transitions to DEPOSITING state
Error messages or log output
No error — the event is silently skipped because `placeOrder()` returns early
at the deposit path (PredictController.ts, PAY_WITH_ANY_TOKEN branch)
before reaching the existing trackPredictOrderEvent() call.
Where was this bug found?
Internal release testing
Version
7.73.0
Build number
4275
Build type
None
Device
Iphone simulator
Operating system
iOS
Additional context
No response
Severity
The root cause is in PredictController.placeOrder(). When the active order state is PAY_WITH_ANY_TOKEN, the method transitions to DEPOSITING and returns early (line ~940-985) before the trackPredictOrderEvent({ status: SUBMITTED }) call at line ~1033 which only fires for the direct order path.
Describe the bug
When a user places a buy order using the pay-with-any-token flow, the PREDICT_TRADE_TRANSACTION analytics event with status: submitted is never fired for the deposit transition (PAY_WITH_ANY_TOKEN → DEPOSITING). The direct balance flow correctly fires this event, but the deposit path returns early before reaching the existing tracking call, leaving a gap in the analytics funnel.
Expected behavior
The deposit flow should fire a PREDICT_TRADE_TRANSACTION event with status: submitted when transitioning to DEPOSITING state, matching the behavior of the direct order path. The event should also include the predict_token_address property identifying which external token the user selected for payment.
Screenshots/Recordings
No response
Steps to reproduce
Error messages or log output
Where was this bug found?
Internal release testing
Version
7.73.0
Build number
4275
Build type
None
Device
Iphone simulator
Operating system
iOS
Additional context
No response
Severity
The root cause is in PredictController.placeOrder(). When the active order state is PAY_WITH_ANY_TOKEN, the method transitions to DEPOSITING and returns early (line ~940-985) before the trackPredictOrderEvent({ status: SUBMITTED }) call at line ~1033 which only fires for the direct order path.