Finally finished my first coinflip Dapp in Solidity en JavaScript. Took me a long time to finish it. I came across a lot of hurdles but manage to solve most of them except a bug with the event triggers.
See below for my coinflip Dapp.
Github repository: https://github.com/TopgunJHW/CoinFlip-Dapp
Video Dapp in action: https://github.com/TopgunJHW/CoinFlip-Dapp/blob/master/demo/Dapp%20coinflip%20-%20demo.mp4
I still have a bug in the front-end regarding triggering of multiple event listeners by 1 event. I could not solve it and hope someone can help me.
See the bug in the videolink below. I have 2 bets waiting for the provable oracle. At timestamp 1.24 the first event comes in and triggers both event listeners of both my bets. The console in video shows that both events has been triggered. The event where the query ID is not the same should not trigger.