重构
This commit is contained in:
@@ -2,10 +2,12 @@ import Decimal from 'decimal.js';
|
||||
import {
|
||||
calculatePayout,
|
||||
settleSelection,
|
||||
FT_CORRECT_SCORE_TEMPLATE,
|
||||
HT_CORRECT_SCORE_TEMPLATE,
|
||||
type ScoreInput,
|
||||
} from './domain/settlement-calculator';
|
||||
import {
|
||||
FT_CORRECT_SCORE_TEMPLATE,
|
||||
HT_CORRECT_SCORE_TEMPLATE,
|
||||
} from '@thebet365/shared';
|
||||
|
||||
export type SmartScoreStrategy =
|
||||
| 'MIN_PAYOUT'
|
||||
@@ -39,8 +41,8 @@ export type ScoreEvaluation = {
|
||||
};
|
||||
|
||||
function templateForMarket(marketType: string): string[] {
|
||||
if (marketType === 'FT_CORRECT_SCORE') return FT_CORRECT_SCORE_TEMPLATE;
|
||||
if (marketType.includes('CORRECT_SCORE')) return HT_CORRECT_SCORE_TEMPLATE;
|
||||
if (marketType === 'FT_CORRECT_SCORE') return [...FT_CORRECT_SCORE_TEMPLATE];
|
||||
if (marketType.includes('CORRECT_SCORE')) return [...HT_CORRECT_SCORE_TEMPLATE];
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user