Copy betslips shared by other users to place the same bets.
CentralHubBetShareCopyProvider allows users to copy betslips shared by others, making it easy to place the same bet.
When a bet share is copied, the copy count increments and the copied bet data can be used to populate your bet slip.
This feature enables community members to share winning strategies and learn from successful bettors.
class BetCopyViewModel : ViewModel(), KoinComponent {
private val betCopyProvider:
CentralHubBetShareCopyProvider = get()
suspend fun copyBet(betShareMessageId: String) {
betCopyProvider.copyBetShare(
betShareMessageId = betShareMessageId,
onSuccess = {
// Bet copied successfully
// Use bet data to populate bet slip
},
onFailure = { error ->
// Handle error (e.g., bet no longer available)
}
)
}
}