This hook is used to fetch bets summary information for user's address.
Usage
import { useBetsSummary } from '@azuro-org/sdk'
const { loading, error, toPayout, inBets } = useBetsSummary({
account: '0xlknqk123...'
})
Props
{
account: string // user's address
affiliates?: string[] // array of affiliate addresses that will be included in data
}
Return Value
{
loading: boolean
error: Error | null
toPayout: string // summary redeem amount
inBets: string // summary pending bets amount
totalPayout: string // sum of total winnins ( includes unredeemed bets )
totalProfit: string // sum of total profits
betsCount: number // number of all bets
wonBetsCount: number // number of won bets
lostBetsCount: number // number of lost bets
}