diff --git a/src/common/blockchainWrapper.js b/src/common/blockchainWrapper.js index 515f304..c8b1649 100644 --- a/src/common/blockchainWrapper.js +++ b/src/common/blockchainWrapper.js @@ -133,7 +133,9 @@ async function getTokenSymbol() { const rouletteContractEvents = new ethers.Contract( ROULETTE_CONTRACT_ADDRESS, [ - 'event ExecutedWager(address indexed, uint256)', + 'event ExecutedWager(address indexed, uint256, uint256, uint256)', + 'event BetPlaced(address indexed, string, uint256)', + 'event BetCleared(address indexed)', ], provider ); diff --git a/src/components/roulette/ClearBetsButton.js b/src/components/roulette/ClearBetsButton.js new file mode 100644 index 0000000..a0cd228 --- /dev/null +++ b/src/components/roulette/ClearBetsButton.js @@ -0,0 +1,29 @@ +const CLASS_NAME = "ClearBetsButton-component"; + +export function ClearBetsButton(props) { + const hasBets = props.pendingBets && props.pendingBets.length > 0; + const isDisabled = props.wheelIsSpinning || !hasBets; + + return ( +