From 87561503c18dfea4cf656aeab395f35312ad4aed Mon Sep 17 00:00:00 2001 From: mantikoros Date: Thu, 18 Aug 2022 10:39:48 -0500 Subject: [PATCH] accept challenge: redeem shares --- functions/src/accept-challenge.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/src/accept-challenge.ts b/functions/src/accept-challenge.ts index eae6ab55..a96a4027 100644 --- a/functions/src/accept-challenge.ts +++ b/functions/src/accept-challenge.ts @@ -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 } })