Hook is used for redeem a winning bet or refund a canceled one.
Usage
import { useRedeemBet } from '@azuro-org/sdk'
const { submit, isPending, isProcessing } = useRedeemBet()
submit()
Return Value
type SubmitProps = {
tokenId: string | bigint // id of the bet's NFT
coreAddress: Address // core contract address
}
{
data: WriteContractResult | null // transaction data
error: Error | null // redeem error
submit: (props: SubmitProps) => Promise<TransactionReceipt> // function used to trigger the redeem action
isPending: boolean // flag indicates the transaction approve action
isProcessing: boolean // flag indicates the transaction submitting
}