Calculation markets (cbMarkets)
The calculate function is needed to display markets in Custom Bet views.
The calculate function is called whenever a selection within the widget is updated. We need to provide the data of the available markets as cbMarkets
.
For markets and outcomes to be shown, cbMarkets, in the CalculateResponse needs to be defined in the calculate function.
{
id: "99"
status: {
isActive: true
},
outcomes: [
{
id: "1",
status: {
isActive: true
}
},
{
id: "2",
status: {
isActive: true
}
},
]
}