Tutorial "Add Live to Existing Prematch dApp"
In this tutorial, we've outlined the minimal changes required for an existing betting dApp that has already manually implemented Prematch betting.
We highly recommend reading the Live docs to understand how it functions. Additionally, familiarize yourself with the logic implemented in the SDK and the Example dApp (opens in a new tab). Feel free to reuse it.
About this tutorial
This tutorial assumes you have already launched prematch dApp which is based on manual implementation (not SDK).
Join the Conversation
If you have questions about anything related to Azuro Protocol or this tutorial, you're welcome to ask our community on Discord (opens in a new tab). Use #tech-talks (opens in a new tab) channel.
Tutorial contents
-
- Integrate Live constants into your app config.
- Adjust Apollo Context (if used) to accommodate multiple clients.
-
- Retrieve Live events
-
Handle Realtime Live Markets Updates
- Receive Live condition realtime updates to use in Market list UI and Betslip.
-
Prepare the Betslip for Live Betting
- Update the Betslip to distinguish between Prematch and Live events.
- Handle any encountered errors effectively.
-
- Develop the necessary logic for users to place live bets on selected sports events.
-
Integrate Live Bets into the Bet History
- Include live bets in the users' bet history.
- Implement functionality for users to claim winnings from successful live bets.