Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live spread and total #1

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

Live spread and total #1

wants to merge 41 commits into from

Conversation

Gorshtak
Copy link

@Gorshtak Gorshtak commented Oct 2, 2024

No description provided.

* @readonly
* @enum {number}
*/
export const statusCodes = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

@@ -0,0 +1,155 @@
export const FIRST_HALF_ASIAN_HANDICAP = '1st Half Asian Handicap';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Group as enum.

@@ -10,21 +20,29 @@ export const LeagueMap: Record<number, any> = {
sport: Sport.FOOTBALL,
id: League.NFL,
isDrawAvailable: false,
spread: POINT_SPREAD,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge with LeagueMap from API.

homeOdds: 0,
awayOdds: 0,
drawOdds: 0,
errorMessage: 'Returning zero odds cause bookmakers have 0 or 1 odds',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add bookmaker in error message.


// TODO: change to for each
return formattedSpreadOdds
.map(({ line, odds }) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use forEach, unify with total, move common code in separate method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants