diff --git a/functions/src/resolve-market.ts b/functions/src/resolve-market.ts index feddd67c..ca8f5fc0 100644 --- a/functions/src/resolve-market.ts +++ b/functions/src/resolve-market.ts @@ -9,7 +9,7 @@ import { RESOLUTIONS, } from '../../common/contract' import { Bet } from '../../common/bet' -import { getUser, getValues, isProd, log, payUser } from './utils' +import { getContractPath, getUser, getValues, isProd, log, payUser, revalidateStaticProps } from './utils' import { getLoanPayouts, getPayouts, @@ -171,6 +171,8 @@ export const resolvemarket = newEndpoint(opts, async (req, auth) => { await processPayouts([...payouts, ...loanPayouts]) await undoUniqueBettorRewardsIfCancelResolution(contract, outcome) + await revalidateStaticProps(getContractPath(contract)) + const userPayoutsWithoutLoans = groupPayoutsByUser(payouts) const userInvestments = mapValues(