flyzto 2 月之前
父节点
当前提交
cb65a97faa
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      server/triangle/trangleCalc.js

+ 5 - 2
server/triangle/trangleCalc.js

@@ -4,6 +4,8 @@ const IOR_KEYS_MAP = require('./iorKeys');
 const { getSetting } = require('./settings');
 const { eventSolutions } = require('./eventSolutions');
 
+const HG_REBATE_RATIO_LOWER = 0.75;
+
 /**
  * 筛选最优赔率
  */
@@ -13,8 +15,9 @@ const oddRebateValue = (odds, platform, key) => {
   let rebateType = setting[`${platform}RebateType`] ?? 0;
 
   if (platform == 'hg' && key.startsWith('ior_m')) {
-    rebateRatio -= 0.75;
+    rebateRatio -= HG_REBATE_RATIO_LOWER;
   }
+
   if (rebateType == 0) {
     return odds * (1 + rebateRatio / 100);
   }
@@ -140,7 +143,7 @@ const attachRebate = (ior) => {
     rebate = hgRebateRatio;
     rebateType = hgRebateType;
     if (k.startsWith('ior_m')) {
-      rebate -= 0.75;
+      rebate -= HG_REBATE_RATIO_LOWER;
     }
   }
   return { ...ior, b: rebate, t: rebateType };