accept challenge: redeem shares

This commit is contained in:
mantikoros 2022-08-18 10:39:48 -05:00
parent 68a949de35
commit 87561503c1

View File

@ -11,6 +11,7 @@ import { CandidateBet } from '../../common/new-bet'
import { createChallengeAcceptedNotification } from './create-notification'
import { noFees } from '../../common/fees'
import { formatMoney, formatPercent } from '../../common/util/format'
import { redeemShares } from './redeem-shares'
const bodySchema = z.object({
contractId: z.string(),
@ -163,5 +164,7 @@ export const acceptchallenge = newEndpoint({}, async (req, auth) => {
return yourNewBetDoc
})
await redeemShares(auth.uid, contractId)
return { betId: result.id }
})