Skip to content

Roulette UI bug#38

Merged
jduffey merged 9 commits intomainfrom
roulette-ui-bug
Jul 5, 2025
Merged

Roulette UI bug#38
jduffey merged 9 commits intomainfrom
roulette-ui-bug

Conversation

@jduffey
Copy link
Copy Markdown
Owner

@jduffey jduffey commented Jul 5, 2025

No description provided.

jduffey added 9 commits July 4, 2025 21:16
- Optimistically update UI pendingBets locally when a bet is placed to avoid gap before tx mines
- Wait for mined transaction receipts (tx.wait()) for both placeBet and executeWager before using latest block number
- Use receipt.blockNumber to trigger refreshes, eliminating undefined blockNumber bug
- Refresh balances and pending bets after confirmation ensuring real-time UI updates
- Adds in-progress TODO list and setup docs in previous commits but included here to keep branch consistent
…e.sol tests

Changes:
- contracts/Roulette.sol: add _house address, track totalStake, transfer losing bets to house, fix payable cast.
- src/test/contracts/Roulette.js: begin migration to new constructor and bet requirement; added helper functions placeBetForPlayer and spinWithBet; updated first set of tests to new event signature.

Remaining work:
- Finish refactoring all test cases to use helpers and correct assertion flow.
- Update any other test files that interact with Roulette contract.
- Re-run test suite until all passing.
- Merge updateContractAddresses.js functionality into initializeChain.js
- Add _updateBlockchainWrapperAddresses() function to automatically update
  contract addresses in blockchainWrapper.js after deployment
- Remove separate update-addresses npm script from package.json
- Simplify setup workflow to use single init-chain command
- Delete redundant scripts/updateContractAddresses.js file

This change streamlines the setup process by eliminating the need for
a separate address update step, making the workflow more reliable and
user-friendly. The init-chain script now handles both contract deployment
and address updating in one seamless operation.
@jduffey jduffey merged commit f6c54d6 into main Jul 5, 2025
1 of 2 checks passed
@jduffey jduffey deleted the roulette-ui-bug branch July 5, 2025 20:29
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.

1 participant