Skip to content
Commit 488d84c7 authored by Your Name's avatar Your Name
Browse files

Fix duplicate WIN2 payout in extraction and bet resync after settlement



- BET CALC: deduplicate ExtractionAssociation outcomes per result before
  summing payout so WIN2 appearing twice no longer doubles the expected
  payout (14720→7360) fed into the extraction decision algorithm
- _update_bet_results: add updated_at to all bulk losing-bet UPDATE calls
  so BetDetailModel.updated_at is set correctly on bulk paths
- _update_bet_results: bump BetModel.updated_at on all parent bet records
  after settling, so the incremental sync (which gates on
  BetModel.updated_at > last_synced_at) will re-send previously-pending
  bets with their final win/lost result
- Migration 071: delete duplicate (outcome_name, extraction_result) rows
  from extraction_associations keeping the lowest-id survivor, then
  recreate the table with UNIQUE(outcome_name, extraction_result) to
  prevent recurrence

Co-Authored-By: default avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent 70074569
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment