Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.