@betorigami/games 3.2.3 → 3.2.5
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/dist/index.mjs +124 -70
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -14435,6 +14435,9 @@ const diamondsSlotsStyles = i$9`
|
|
|
14435
14435
|
:host {
|
|
14436
14436
|
background-color: var(--background-tertiary);
|
|
14437
14437
|
}
|
|
14438
|
+
}
|
|
14439
|
+
|
|
14440
|
+
@media (max-width: 767px) {
|
|
14438
14441
|
@supports (width: 1cqw) {
|
|
14439
14442
|
:host {
|
|
14440
14443
|
min-height: calc(((100cqw - 24px - (4 * 12px)) / 5) * 0.8 + 48px);
|
|
@@ -14512,11 +14515,9 @@ const diamondsSlotsStyles = i$9`
|
|
|
14512
14515
|
}
|
|
14513
14516
|
|
|
14514
14517
|
:host([constrained-width="true"]) {
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
width: min(80%, calc(100cqh - 48px));
|
|
14519
|
-
}
|
|
14518
|
+
.diamond-gem,
|
|
14519
|
+
.diamond-gem-ghost {
|
|
14520
|
+
width: min(80%, 174px);
|
|
14520
14521
|
}
|
|
14521
14522
|
}
|
|
14522
14523
|
|
|
@@ -14652,6 +14653,9 @@ const diamondsSlotsStyles = i$9`
|
|
|
14652
14653
|
width: 80%;
|
|
14653
14654
|
max-width: 100%;
|
|
14654
14655
|
}
|
|
14656
|
+
}
|
|
14657
|
+
|
|
14658
|
+
@media (max-width: 767px) {
|
|
14655
14659
|
@supports (width: 1cqw) {
|
|
14656
14660
|
.diamond-gem,
|
|
14657
14661
|
.diamond-gem-ghost {
|
|
@@ -15138,7 +15142,7 @@ const kenoTileStyles = i$9`
|
|
|
15138
15142
|
}
|
|
15139
15143
|
|
|
15140
15144
|
:host([data-is-desktop='true']) .keno-tile {
|
|
15141
|
-
font-size:
|
|
15145
|
+
font-size: 17px;
|
|
15142
15146
|
}
|
|
15143
15147
|
|
|
15144
15148
|
.keno-tile:focus-visible {
|
|
@@ -19083,6 +19087,16 @@ const blitzCardContainerStyles = i$9`
|
|
|
19083
19087
|
--blitz-card-height: calc(((100cqw - 12 * var(--blitz-grid-gap)) / 13) * 1.5);
|
|
19084
19088
|
}
|
|
19085
19089
|
|
|
19090
|
+
@media (min-width: 768px) {
|
|
19091
|
+
.container {
|
|
19092
|
+
--blitz-card-height: calc(((var(--blitz-grid-max-width, 720px) - 12 * var(--blitz-grid-gap)) / 13) * 1.5);
|
|
19093
|
+
}
|
|
19094
|
+
|
|
19095
|
+
:host([outcome-display]) .container {
|
|
19096
|
+
--blitz-card-height: calc(((306px - 12 * var(--blitz-grid-gap)) / 13) * 1.5);
|
|
19097
|
+
}
|
|
19098
|
+
}
|
|
19099
|
+
|
|
19086
19100
|
origami-blitz-card {
|
|
19087
19101
|
width: 100%;
|
|
19088
19102
|
height: 100%;
|
|
@@ -20489,20 +20503,20 @@ let AdvancedDiceGame = class extends xt {
|
|
|
20489
20503
|
}
|
|
20490
20504
|
async handleBetExecution(ae, he) {
|
|
20491
20505
|
if (!this.gameData.currency) throw new Error(l$1("alerts.gameError", this.gameData?.language || k));
|
|
20492
|
-
const ke = this.buildGameInputs(),
|
|
20493
|
-
let
|
|
20494
|
-
if (
|
|
20506
|
+
const ke = Big(this.gameData.balance), Bt = this.buildGameInputs(), Rt = { language: this.gameData.language, amount: ae, gameInputs: Bt, meta: he ? $h(he) : void 0 };
|
|
20507
|
+
let Kt;
|
|
20508
|
+
if (this.isDemoMode && ke.lt(Rt.amount) ? Kt = { success: !1, error: l$1("alerts.insufficientBalance", this.gameData?.language || "en") } : (this.preDeductStake(ke, ae), Kt = await this.advancedDiceApi.startBet(Rt)), Kt.success) {
|
|
20495
20509
|
this.isInstantBet || this.gameData.soundEffects?.play(ma.diceRoll());
|
|
20496
|
-
const
|
|
20497
|
-
this.gameData.updateBalance(
|
|
20498
|
-
const
|
|
20499
|
-
|
|
20500
|
-
const { result:
|
|
20501
|
-
this.resultValue =
|
|
20510
|
+
const { betActions: Ca } = Kt.data, Ba = Ca[Ca.length - 1];
|
|
20511
|
+
if (!Ba) throw this.gameData.updateBalance(ke), new Error("No action data received");
|
|
20512
|
+
const Wa = this.isDemoMode ? ke.minus(Kt.data.amount ?? 0).plus(Kt.data.payout ?? 0) : Big(Kt.data.afterBalance ?? 0);
|
|
20513
|
+
this.gameData.updateBalance(Wa), this.showDice = !0;
|
|
20514
|
+
const { result: is } = Ba.data.ADVANCED_DICE, ns = is[0];
|
|
20515
|
+
this.resultValue = ns, this.isWin = Big(Kt.data.multiplier ?? 0).gt(1), this.isWin && setTimeout(() => {
|
|
20502
20516
|
this.playWinFeedback();
|
|
20503
|
-
}, 300), this.addToHistory(
|
|
20504
|
-
} else he || this.showError(
|
|
20505
|
-
return
|
|
20517
|
+
}, 300), this.addToHistory(ns / 100, this.isWin, Kt.data.id ?? ""), this.updateHistoryWithBet(Kt.data);
|
|
20518
|
+
} else this.gameData.updateBalance(ke), he || this.showError(Kt.error);
|
|
20519
|
+
return Kt;
|
|
20506
20520
|
}
|
|
20507
20521
|
addToHistory(ae, he, ke) {
|
|
20508
20522
|
this.history = [...this.history, { multiplier: ae, won: he, id: ke }].slice(-5);
|
|
@@ -22693,8 +22707,14 @@ let BlitzGame = class extends xt {
|
|
|
22693
22707
|
this.resetForNextBet(() => {
|
|
22694
22708
|
this.cardDetails = [], this.revealCardIndex = -1, this.progressActive = !1, this.gameOutcome = null, this.winPopupBet = null;
|
|
22695
22709
|
});
|
|
22696
|
-
const ke =
|
|
22697
|
-
|
|
22710
|
+
const ke = Big(this.gameData.balance);
|
|
22711
|
+
if (this.isDemoMode && ke.lt(ae)) return { success: !1, errorCode: Ed.INSUFFICIENT_BALANCE };
|
|
22712
|
+
this.preDeductStake(ke, ae);
|
|
22713
|
+
const Bt = { amount: ae, gameInputs: { pickCount: this.picks }, meta: he ? $h(he) : void 0 }, Rt = await this.placeBet(() => this.getBlitzApi().startBet(Bt));
|
|
22714
|
+
if (!Rt.success) return this.gameData.updateBalance(ke), Rt;
|
|
22715
|
+
this.cardDetails = Rt.cards.map((Ca) => BlitzUtils.getCardDetails(Ca)), this.updateHistoryWithBet({ id: Rt.id, amount: Rt.amount.toNumber(), payout: Rt.payout.toNumber() }), this.isInstantBet ? await this.revealCardsInstant(Rt) : await this.revealCards(Rt, !he);
|
|
22716
|
+
const Kt = this.isDemoMode ? ke.minus(Rt.amount).plus(Rt.payout) : Rt.afterBalance;
|
|
22717
|
+
return this.gameData.updateBalance(Kt), Rt;
|
|
22698
22718
|
}
|
|
22699
22719
|
async revealCardsInstant(ae) {
|
|
22700
22720
|
const he = BlitzUtils.getRevealTargetIndex(this.cardDetails), ke = BlitzUtils.getLossIndex(this.cardDetails);
|
|
@@ -23921,10 +23941,16 @@ let DiceGame = class extends xt {
|
|
|
23921
23941
|
}
|
|
23922
23942
|
}
|
|
23923
23943
|
async handleBetExecution(ae, he) {
|
|
23924
|
-
const ke =
|
|
23925
|
-
|
|
23944
|
+
const ke = Big(this.gameData.balance);
|
|
23945
|
+
if (this.isDemoMode && ke.lt(ae)) return { success: !1, errorCode: Ed.INSUFFICIENT_BALANCE };
|
|
23946
|
+
this.preDeductStake(ke, ae);
|
|
23947
|
+
const Bt = { amount: ae, direction: this.diceDirection, selectedValue: this.selectedValue, meta: he ? $h(he) : void 0 }, Rt = await this.getDiceApi().startBet(Bt);
|
|
23948
|
+
if (!Rt.success) return this.gameData.updateBalance(ke), Rt;
|
|
23949
|
+
this.isInstantBet || this.gameData.soundEffects?.play(ma.diceRoll());
|
|
23950
|
+
const Kt = this.isDemoMode ? ke.minus(Rt.amount).plus(Rt.payout) : Rt.afterBalance;
|
|
23951
|
+
return this.gameData.updateBalance(Kt), this.resultValue = Rt.result, this.isWin = Rt.isWin, this.isWin && setTimeout(() => {
|
|
23926
23952
|
this.playWinFeedback();
|
|
23927
|
-
}, 300), this.addToHistory(
|
|
23953
|
+
}, 300), this.addToHistory(Rt.result / 100, this.isWin, Rt.id), this.updateHistoryWithBet({ id: Rt.id, amount: Rt.amount.toNumber(), payout: Rt.payout.toNumber() }), Rt;
|
|
23928
23954
|
}
|
|
23929
23955
|
async executeAutobet(ae, he) {
|
|
23930
23956
|
const ke = await this.handleBetExecution(he, ae);
|
|
@@ -24837,54 +24863,72 @@ let KenoGame = class extends xt {
|
|
|
24837
24863
|
}
|
|
24838
24864
|
async handleBetExecution(ae, he) {
|
|
24839
24865
|
if (!this.gameData.currency) throw new Error("Currency is not set");
|
|
24840
|
-
const ke = { language: this.gameData.language, amount: ae, riskLevel: this.kenoRisk, selectedNumbers: this.selectedTiles };
|
|
24841
|
-
let
|
|
24842
|
-
if (
|
|
24843
|
-
|
|
24844
|
-
|
|
24845
|
-
|
|
24846
|
-
|
|
24866
|
+
const ke = Big(this.gameData.balance), Bt = { language: this.gameData.language, amount: ae, riskLevel: this.kenoRisk, selectedNumbers: this.selectedTiles };
|
|
24867
|
+
let Rt;
|
|
24868
|
+
if (this.isDemoMode && ke.lt(Bt.amount)) Rt = { success: !1, error: l$1("alerts.insufficientBalance", this.gameData?.language || "en") };
|
|
24869
|
+
else {
|
|
24870
|
+
this.preDeductStake(ke, ae);
|
|
24871
|
+
try {
|
|
24872
|
+
Rt = await this.kenoApi.startBet(Bt);
|
|
24873
|
+
} catch (Kt) {
|
|
24874
|
+
throw this.gameData.updateBalance(ke), Kt;
|
|
24875
|
+
}
|
|
24876
|
+
}
|
|
24877
|
+
if (Rt.success) {
|
|
24878
|
+
const { betActions: Kt } = Rt.data, Ca = Kt[Kt.length - 1]?.data.KENO;
|
|
24879
|
+
if (!Ca || !("result" in Ca)) throw this.gameData.updateBalance(ke), new Error("No keno data found");
|
|
24880
|
+
this.multiplier = this.getDisplayMultiplier(this.gameData.betAmount, Number(Rt.data.multiplier), Ca.result);
|
|
24881
|
+
const Ba = new Set(this.selectedTiles);
|
|
24847
24882
|
await this.executeInstantOrAnimated(async () => {
|
|
24848
|
-
this.playLossGemRevealFeedback(
|
|
24883
|
+
this.playLossGemRevealFeedback(Ca.result, Ba), this.resultTiles = [...Ca.result];
|
|
24849
24884
|
}, async () => {
|
|
24850
|
-
let
|
|
24851
|
-
for (const
|
|
24852
|
-
}), this.gameWinPopupShowing = this.multiplier > 0, this.gameWinPopupShowing && this.playWinFeedback(), this.payout = Big(
|
|
24853
|
-
const
|
|
24854
|
-
this.gameData.updateBalance(
|
|
24855
|
-
}
|
|
24856
|
-
return
|
|
24885
|
+
let is = 0;
|
|
24886
|
+
for (const ns of Ca.result) is = this.playAnimatedRevealFeedback(ns, Ba, is), this.resultTiles = [...this.resultTiles, ns], await Pt(he);
|
|
24887
|
+
}), this.gameWinPopupShowing = this.multiplier > 0, this.gameWinPopupShowing && this.playWinFeedback(), this.payout = Big(Rt.data.payout ?? 0), this.addToHistory(Big(Rt.data.multiplier ?? 0).toNumber(), this.gameWinPopupShowing, Rt.data.id ?? ""), this.updateHistoryWithBet(Rt.data);
|
|
24888
|
+
const Wa = this.isDemoMode ? ke.minus(Rt.data.amount ?? 0).plus(Rt.data.payout ?? 0) : Big(Rt.data.afterBalance ?? 0);
|
|
24889
|
+
this.gameData.updateBalance(Wa);
|
|
24890
|
+
} else this.gameData.updateBalance(ke);
|
|
24891
|
+
return Rt;
|
|
24857
24892
|
}
|
|
24858
24893
|
addToHistory(ae, he, ke) {
|
|
24859
24894
|
const Bt = [...this.history, { multiplier: ae, won: he, id: ke }];
|
|
24860
24895
|
this.history = Bt.slice(-5);
|
|
24861
24896
|
}
|
|
24862
24897
|
async executeAutobet(ae, he) {
|
|
24898
|
+
if (!this.gameData.currency) throw new Error("Currency is not set");
|
|
24899
|
+
if (this.resetForNextBet(() => {
|
|
24900
|
+
this.resultTiles = [], this.gameOver = !1, this.gameWinPopupShowing = !1;
|
|
24901
|
+
}), this.selectedTiles.length === 0) return { pnl: Big(0), gameOutcome: "Draw", hasError: !0, errorMessage: l$1("games.keno.selectTileToAutobet", this.gameData.language || k) };
|
|
24902
|
+
const ke = Big(this.gameData.balance);
|
|
24903
|
+
let Bt, Rt;
|
|
24904
|
+
this.preDeductStake(ke, he);
|
|
24863
24905
|
try {
|
|
24864
|
-
|
|
24865
|
-
if (this.
|
|
24866
|
-
|
|
24867
|
-
|
|
24868
|
-
const
|
|
24869
|
-
if (!
|
|
24870
|
-
const
|
|
24871
|
-
|
|
24872
|
-
const
|
|
24873
|
-
this.multiplier = this.getDisplayMultiplier(he, Number(Rt.multiplier), is);
|
|
24874
|
-
const ns = new Set(this.selectedTiles);
|
|
24906
|
+
const Kt = { language: this.gameData.language, amount: he, riskLevel: this.kenoRisk, selectedNumbers: this.selectedTiles, meta: ae ? $h(ae) : void 0 }, Ca = await this.placeBet(() => this.kenoApi.startBet(Kt));
|
|
24907
|
+
if (!Ca.success) return this.gameData.updateBalance(ke), { pnl: Big(0), gameOutcome: "Draw", hasError: !0, errorMessage: Ca.error || l$1("alerts.errorProcessingBet", this.gameData.language || k) };
|
|
24908
|
+
const Ba = Ca.data;
|
|
24909
|
+
Bt = Big(Ba.payout ?? 0).minus(Ba.amount ?? 0), Rt = Mh(Number(Ba.multiplier));
|
|
24910
|
+
const Wa = Ba.betActions, is = Wa[Wa.length - 1]?.data.KENO;
|
|
24911
|
+
if (!is || !("result" in is)) throw this.gameData.updateBalance(ke), new Error("No keno data found");
|
|
24912
|
+
const { result: ns } = is;
|
|
24913
|
+
this.multiplier = this.getDisplayMultiplier(he, Number(Ba.multiplier), ns);
|
|
24914
|
+
const as = new Set(this.selectedTiles);
|
|
24875
24915
|
await this.executeInstantOrAnimated(async () => {
|
|
24876
|
-
this.playLossGemRevealFeedback(
|
|
24916
|
+
this.playLossGemRevealFeedback(ns, as), this.resultTiles = [...ns];
|
|
24877
24917
|
}, async () => {
|
|
24878
|
-
let
|
|
24879
|
-
for (const
|
|
24880
|
-
}), this.gameWinPopupShowing = this.multiplier > 0, this.gameWinPopupShowing && this.playWinFeedback(), this.payout = Big(
|
|
24881
|
-
const
|
|
24882
|
-
|
|
24883
|
-
} catch (
|
|
24884
|
-
return console.error("Error in executeAutobet:", ke), { pnl: Big(0), gameOutcome: "Draw", hasError: !0, errorMessage: l$1("alerts.gameError", this.gameData.language || k) };
|
|
24918
|
+
let ss = 0;
|
|
24919
|
+
for (const rs of ns) ss = this.playAnimatedRevealFeedback(rs, as, ss), this.resultTiles = [...this.resultTiles, rs], await Pt(this.getDelay(150));
|
|
24920
|
+
}), this.gameWinPopupShowing = this.multiplier > 0, this.gameWinPopupShowing && this.playWinFeedback(), this.payout = Big(Ba.payout ?? 0), this.addToHistory(Number(Ba.multiplier ?? 0), this.gameWinPopupShowing, Ba.id ?? ""), this.updateHistoryWithBet(Ba);
|
|
24921
|
+
const Ka = this.isDemoMode ? ke.minus(Ca.data.amount ?? 0).plus(Ca.data.payout ?? 0) : Big(Ca.data.afterBalance ?? 0);
|
|
24922
|
+
this.gameData.updateBalance(Ka);
|
|
24923
|
+
} catch (Kt) {
|
|
24924
|
+
return console.error("Error in executeAutobet:", Kt), this.gameData.updateBalance(ke), { pnl: Big(0), gameOutcome: "Draw", hasError: !0, errorMessage: l$1("alerts.gameError", this.gameData.language || k) };
|
|
24925
|
+
}
|
|
24926
|
+
try {
|
|
24927
|
+
await this.holdResultDisplay();
|
|
24885
24928
|
} finally {
|
|
24886
|
-
this.gameOver = !0;
|
|
24929
|
+
this.gameWinPopupShowing = !1, this.gameOver = !0;
|
|
24887
24930
|
}
|
|
24931
|
+
return { pnl: Bt, gameOutcome: Rt, hasError: !1 };
|
|
24888
24932
|
}
|
|
24889
24933
|
render() {
|
|
24890
24934
|
const ae = this.selectedTiles.length, he = this.gameData.mainWidth >= 768, ke = this.kenoEdge, Bt = Qr.configs(ke).find((Kt) => Kt.tiles === this.selectedTiles.length)?.payout[this.kenoRisk][this.selectedTiles.length] ?? 1, Rt = Rh(this.gameData);
|
|
@@ -25443,9 +25487,11 @@ let LimboGame = class extends xt {
|
|
|
25443
25487
|
if (!this.areInputsDisabled) {
|
|
25444
25488
|
this.isManualPlaying = !0;
|
|
25445
25489
|
try {
|
|
25446
|
-
const ae = await this.handleBetExecution(this.gameData.betAmount);
|
|
25447
|
-
if (!
|
|
25448
|
-
await this.awaitRevealAnimation(
|
|
25490
|
+
const ae = Big(this.gameData.balance), he = await this.handleBetExecution(this.gameData.betAmount);
|
|
25491
|
+
if (!he.success) return void this.showError(l$1(Lh(he.errorCode), this.gameData.language));
|
|
25492
|
+
await this.awaitRevealAnimation(he.id);
|
|
25493
|
+
const ke = this.isDemoMode ? ae.minus(he.amount).plus(he.payout) : he.afterBalance;
|
|
25494
|
+
this.gameData.updateBalance(ke);
|
|
25449
25495
|
} finally {
|
|
25450
25496
|
this.isManualPlaying = !1;
|
|
25451
25497
|
}
|
|
@@ -25455,8 +25501,11 @@ let LimboGame = class extends xt {
|
|
|
25455
25501
|
this.resetForNextBet(() => {
|
|
25456
25502
|
this.resultMultiplier = null;
|
|
25457
25503
|
});
|
|
25458
|
-
const ke =
|
|
25459
|
-
|
|
25504
|
+
const ke = Big(this.gameData.balance);
|
|
25505
|
+
if (this.isDemoMode && ke.lt(ae)) return { success: !1, errorCode: Ed.INSUFFICIENT_BALANCE };
|
|
25506
|
+
this.preDeductStake(ke, ae);
|
|
25507
|
+
const Bt = this.targetMultiplier, Rt = { amount: ae, targetMultiplier: Number(Big(Bt).mul(MULTIPLIER_PRECISION).toFixed(0)), meta: he ? $h(he) : void 0 }, Kt = await this.placeBet(() => this.getLimboApi().startBet(Rt));
|
|
25508
|
+
return Kt.success ? (this.resultMultiplier = Kt.resultMultiplier.toNumber(), this.betTargetMultiplier = Bt, this.betId = Kt.id, this.updateHistoryWithBet({ id: Kt.id, amount: Kt.amount.toNumber(), payout: Kt.payout.toNumber() }), Kt) : (this.gameData.updateBalance(ke), Kt);
|
|
25460
25509
|
}
|
|
25461
25510
|
async awaitRevealAnimation(ae) {
|
|
25462
25511
|
this.isInstantBet || await this.waitForAnimationComplete(ae);
|
|
@@ -25475,11 +25524,13 @@ let LimboGame = class extends xt {
|
|
|
25475
25524
|
});
|
|
25476
25525
|
}
|
|
25477
25526
|
async executeAutobet(ae, he) {
|
|
25478
|
-
const ke = await this.handleBetExecution(he, ae);
|
|
25479
|
-
if (!
|
|
25480
|
-
await this.awaitRevealAnimation(
|
|
25481
|
-
const
|
|
25482
|
-
|
|
25527
|
+
const ke = Big(this.gameData.balance), Bt = await this.handleBetExecution(he, ae);
|
|
25528
|
+
if (!Bt.success) return { pnl: Big(0), gameOutcome: "Draw", hasError: !0, errorMessage: l$1(Lh(Bt.errorCode), this.gameData.language) };
|
|
25529
|
+
await this.awaitRevealAnimation(Bt.id);
|
|
25530
|
+
const Rt = this.isDemoMode ? ke.minus(Bt.amount).plus(Bt.payout) : Bt.afterBalance;
|
|
25531
|
+
this.gameData.updateBalance(Rt);
|
|
25532
|
+
const Kt = Bt.payout.minus(Bt.amount), Ca = Mh(Bt.multiplier.toNumber());
|
|
25533
|
+
return await this.holdResultDisplay(), { pnl: Kt, gameOutcome: Ca, hasError: !1 };
|
|
25483
25534
|
}
|
|
25484
25535
|
calculateProfitOnWin() {
|
|
25485
25536
|
return Big(this.gameData.betAmount).mul(this.targetMultiplier).minus(this.gameData.betAmount).toFixed(4);
|
|
@@ -27004,7 +27055,8 @@ const rouletteTopStyles = i$9`
|
|
|
27004
27055
|
|
|
27005
27056
|
.center-handle {
|
|
27006
27057
|
animation: counter-spin 20s linear infinite;
|
|
27007
|
-
transform-
|
|
27058
|
+
transform-box: fill-box;
|
|
27059
|
+
transform-origin: 50% 50%;
|
|
27008
27060
|
}
|
|
27009
27061
|
|
|
27010
27062
|
@keyframes counter-spin {
|
|
@@ -28277,7 +28329,7 @@ const rouletteContentStyles = i$9`
|
|
|
28277
28329
|
pointer-events: none;
|
|
28278
28330
|
}
|
|
28279
28331
|
|
|
28280
|
-
@media (min-width:
|
|
28332
|
+
@media (min-width: 768px) {
|
|
28281
28333
|
.roulette-overlay {
|
|
28282
28334
|
display: none;
|
|
28283
28335
|
}
|
|
@@ -28786,6 +28838,7 @@ let RouletteGame = class extends fa {
|
|
|
28786
28838
|
try {
|
|
28787
28839
|
if (this.isDemoMode && Bt.lt(this.totalBetAmount)) throw new Error(l$1("alerts.insufficientBalance", this.gameData?.language || k));
|
|
28788
28840
|
if (this.isMaxPayoutExceeded(this.chipEvents)) throw new Error(l$1("alerts.maxPayoutExceeded", this.gameData?.language || k));
|
|
28841
|
+
this.preDeductStake(Bt, this.totalBetAmount);
|
|
28789
28842
|
const Rt = await this.placeBet(() => this.rouletteApi.startBet({ language: this.gameData.language, gameInputs: ke, meta: ae ? $h(ae) : void 0 }));
|
|
28790
28843
|
if (Rt.success) {
|
|
28791
28844
|
const { data: Kt } = Rt;
|
|
@@ -28793,6 +28846,7 @@ let RouletteGame = class extends fa {
|
|
|
28793
28846
|
}
|
|
28794
28847
|
throw new Error(Rt.error);
|
|
28795
28848
|
} catch (Rt) {
|
|
28849
|
+
this.gameData.updateBalance(Bt);
|
|
28796
28850
|
const Kt = Rt instanceof Error ? Rt.message : l$1("alerts.gameError", this.gameData?.language || k);
|
|
28797
28851
|
return this.showError(Kt), { success: !1, error: Kt };
|
|
28798
28852
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betorigami/games",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.5",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"build:static": "vite build --config vite.static.config.js",
|
|
56
56
|
"preview:static": "vite preview --outDir static-dist",
|
|
57
57
|
"watch": "vite",
|
|
58
|
+
"watch:linked": "vite --mode linked",
|
|
58
59
|
"bundlemon": "bundlemon --subProject games",
|
|
59
60
|
"e2e": "playwright test e2e",
|
|
60
61
|
"e2e:debug": "playwright test e2e/dice/dice* --headed",
|