Skip to content

Conversation

@jduffey
Copy link
Owner

@jduffey jduffey commented Jul 5, 2025

No description provided.

jduffey added 7 commits July 5, 2025 16:36
- Updated MostRecentSpinResults and SpinResult components to handle new 4-parameter ExecutedWager event signature
- Updated blockchainWrapper event definition to match updated smart contract
- Added BetPlaced and BetCleared events to blockchainWrapper for future use
- Fixes issue where most recent numbers were not displaying after contract updates
- Replace polling with event-driven updates in NumbersHitTracker
- Remove 1-second delay that caused HitNumbers to update after MostRecent
- Use ExecutedWager event listener instead of setTimeout polling
- Add proper event listener cleanup to prevent memory leaks
- Both boxes now update simultaneously when wheel spins
- Create ClearBetsButton component with proper styling and state management
- Add handleClearBetsClick function to Roulette component
- Integrate with existing clearBets blockchain function
- Add proper validation (no bets to clear, wheel spinning)
- Include optimistic UI updates with error handling
- Add comprehensive tests for ClearBetsButton component
- Update CSS styling for button positioning and appearance
- Update test snapshots to include new component
- Fix event listener setup in MostRecentSpinResults and SpinResult components
- Add proper event listener cleanup to prevent memory leaks and duplicate listeners
- Optimize spin flow by setting up event listeners BEFORE transaction execution
- Add centralized event management in main Roulette component
- Implement event-driven updates for BetPlaced, BetCleared, and ExecutedWager events
- Remove redundant getRandomWheelNumber call that was causing delays
- Ensure all UI components update simultaneously when blockchain events occur
- Improve error handling and cleanup for event listeners
- Remove unused imports: getCompleteResultsOfRound, getRandomWheelNumber
- Remove unused state variable: previousRoundResultsForBetResultsInfo
- Remove unused BetResultsInfo component and import
- Update test snapshots to reflect component removal
- All ESLint warnings now resolved
- Import and integrate BetResultsInfo component in Roulette.js
- Add state management for previousRoundResultsForBetResultsInfo
- Calculate and store previous round results when ExecutedWager event fires
- Convert wheel number format properly (37 -> '00' for display)
- Display bet name, amount, winnings, and bet returned for each bet
- Show totals and balance changes (starting, net, final)
- Update test snapshots to include new BetResultsInfo component
- Improve user experience by showing detailed results after each spin

This enhancement provides players with comprehensive feedback about their
previous round performance, including individual bet outcomes and overall
balance changes.
@jduffey jduffey merged commit c51e9a6 into main Jul 6, 2025
1 of 2 checks passed
@jduffey jduffey deleted the fix-recent-numbers branch July 6, 2025 01:52
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