@devrongx/games 0.4.46 → 0.4.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -583,7 +583,7 @@ export const PreMatchGame = ({
|
|
|
583
583
|
<div className="sticky bottom-0 z-10 -mx-4 px-4 pt-3 pb-5"
|
|
584
584
|
style={{ background: "linear-gradient(180deg, transparent 0%, #0a0a12 12%, #0a0a12 100%)" }}>
|
|
585
585
|
|
|
586
|
-
<div className="flex items-
|
|
586
|
+
<div className="flex items-start justify-between gap-3">
|
|
587
587
|
{/* Left — text area */}
|
|
588
588
|
<div className="flex flex-col gap-2 flex-1 min-w-0 overflow-hidden">
|
|
589
589
|
{/* Remaining balance */}
|
|
@@ -423,7 +423,8 @@ export function calcBetSummary(
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
let totalEntry = 0;
|
|
426
|
-
let
|
|
426
|
+
let individualReward = 0;
|
|
427
|
+
let parlayReward = 0;
|
|
427
428
|
let weightedRiskSum = 0;
|
|
428
429
|
|
|
429
430
|
for (const [mIdxStr, { optionIdx, amount, parlaySlot }] of Object.entries(bets)) {
|
|
@@ -434,7 +435,7 @@ export function calcBetSummary(
|
|
|
434
435
|
|
|
435
436
|
const isInActiveParlay = parlaySlot !== null && activeSlots.has(parlaySlot);
|
|
436
437
|
if (!isInActiveParlay) {
|
|
437
|
-
|
|
438
|
+
individualReward += Math.round(amount * opt.odds);
|
|
438
439
|
}
|
|
439
440
|
}
|
|
440
441
|
|
|
@@ -448,10 +449,11 @@ export function calcBetSummary(
|
|
|
448
449
|
combinedOdds *= opt.odds;
|
|
449
450
|
parlayStake += bet.amount;
|
|
450
451
|
}
|
|
451
|
-
|
|
452
|
+
parlayReward += Math.round(parlayStake * combinedOdds * (config.compoundMultipliers[legs.length] ?? 1));
|
|
452
453
|
}
|
|
453
454
|
|
|
454
|
-
const
|
|
455
|
+
const baseReward = individualReward + parlayReward;
|
|
456
|
+
const compoundedReward = baseReward;
|
|
455
457
|
const remainingBalance = startingBalance - totalEntry;
|
|
456
458
|
const potentialBalance = remainingBalance + compoundedReward;
|
|
457
459
|
const riskPercent = totalEntry > 0
|
|
@@ -599,8 +601,5 @@ export function calcDisplayReward(
|
|
|
599
601
|
betAmount?: number,
|
|
600
602
|
): number {
|
|
601
603
|
const base = betAmount != null ? Math.round(betAmount * opt.odds) : optionReward(opt);
|
|
602
|
-
if (isSelected && selectedCount >= 2) {
|
|
603
|
-
return Math.round(base * compoundMultiplier);
|
|
604
|
-
}
|
|
605
604
|
return base;
|
|
606
605
|
}
|