gg
This commit is contained in:
@@ -340,7 +340,9 @@ export class DataFetcherTask {
|
||||
for (const row of rows) {
|
||||
const result = this.resolvePredictionRunSettlement(row);
|
||||
if (!result) continue;
|
||||
const closingOddsSnapshot = await this.getClosingOddsSnapshot(row.matchId);
|
||||
const closingOddsSnapshot = await this.getClosingOddsSnapshot(
|
||||
row.matchId,
|
||||
);
|
||||
const settlementSummary = {
|
||||
settled_at: new Date().toISOString(),
|
||||
model_version: row.engineVersion,
|
||||
@@ -453,7 +455,13 @@ export class DataFetcherTask {
|
||||
const playable = mainPick.playable === true;
|
||||
const odds = Number(mainPick.odds || 0);
|
||||
|
||||
if (!market || !pick || !playable || !Number.isFinite(odds) || odds <= 1.01) {
|
||||
if (
|
||||
!market ||
|
||||
!pick ||
|
||||
!playable ||
|
||||
!Number.isFinite(odds) ||
|
||||
odds <= 1.01
|
||||
) {
|
||||
return { outcome: "NO_BET", unitProfit: 0 };
|
||||
}
|
||||
|
||||
@@ -516,10 +524,9 @@ export class DataFetcherTask {
|
||||
|
||||
const goalLine = this.goalLineForMarket(market);
|
||||
if (goalLine !== null) {
|
||||
const total =
|
||||
market.startsWith("HT_")
|
||||
? this.nullableSum(input.htScoreHome, input.htScoreAway)
|
||||
: scoreHome + scoreAway;
|
||||
const total = market.startsWith("HT_")
|
||||
? this.nullableSum(input.htScoreHome, input.htScoreAway)
|
||||
: scoreHome + scoreAway;
|
||||
if (total === null) return null;
|
||||
if (this.isOverPick(pick)) return total > goalLine;
|
||||
return total < goalLine;
|
||||
@@ -537,7 +544,8 @@ export class DataFetcherTask {
|
||||
if (market === "HTFT") {
|
||||
const htHome = input.htScoreHome;
|
||||
const htAway = input.htScoreAway;
|
||||
if (htHome === null || htAway === null || !pick.includes("/")) return null;
|
||||
if (htHome === null || htAway === null || !pick.includes("/"))
|
||||
return null;
|
||||
const [htPick, ftPick] = pick.split("/");
|
||||
return (
|
||||
this.isResultPickWon(htPick, htHome, htAway) === true &&
|
||||
|
||||
Reference in New Issue
Block a user