accept challenge: redeem shares
This commit is contained in:
parent
68a949de35
commit
87561503c1
|
@ -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 }
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user