From b6b9bd6c2dcf586624f51f9235ef6310ef7aa2d4 Mon Sep 17 00:00:00 2001 From: David Chee Date: Wed, 15 Jan 2025 18:14:54 -0800 Subject: [PATCH] cast contract as sportscontract --- backend/shared/src/resolve-sports-markets.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/shared/src/resolve-sports-markets.ts b/backend/shared/src/resolve-sports-markets.ts index 9d33696473..a7cd2bf867 100644 --- a/backend/shared/src/resolve-sports-markets.ts +++ b/backend/shared/src/resolve-sports-markets.ts @@ -1,6 +1,6 @@ import { createSupabaseDirectClient } from 'shared/supabase/init' import { log } from 'shared/utils' -import { CPMMMultiContract } from 'common/contract' +import { SportsContract } from 'common/contract' import { HOUSE_LIQUIDITY_PROVIDER_ID } from 'common/antes' import { resolveMarketHelper } from 'shared/resolve-market-helpers' import { getLiveScores } from 'shared/get-sports-live-scores' @@ -33,7 +33,7 @@ export async function resolveSportsMarkets() { .join(', ')}) `, completedGameIds, - (row) => convertContract(row) + (row) => convertContract(row) ) log(`Found ${unresolvedContracts.length} unresolved contracts.`) @@ -77,7 +77,8 @@ export async function resolveSportsMarkets() { for (const contract of matchingContracts) { try { - const multiContract = contract as CPMMMultiContract + if (contract.mechanism!=='cpmm-multi-1') continue + const multiContract = contract const { answers, sportsLeague } = multiContract const isEPL = sportsLeague === 'English Premier League'