@betorigami/games 3.2.6 → 3.2.7

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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -4
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -26096,7 +26096,7 @@ let MinesGame = class extends xt {
26096
26096
  async getMinesActiveBet() {
26097
26097
  try {
26098
26098
  const he = await this.getMinesApi().getActiveBet();
26099
- if (!he.success) return void this.emit("show-alert", { detail: { type: "error", message: l$1($h(he.errorCode), this.gameData.language) } });
26099
+ if (!he.success) return void this.showError(l$1($h(he.errorCode), this.gameData.language));
26100
26100
  if (!he.data) return void (this.minesData = null);
26101
26101
  this.gameData.updateBetAmount(he.data.amount), this.minesCount = he.data.state.minesCount, this.minesData = he.data, this.setActiveBetNonce(he.data.nonce), this.manualOrAuto !== "Manual" && (this.manualOrAuto = "Manual");
26102
26102
  } finally {
@@ -26120,7 +26120,7 @@ let MinesGame = class extends xt {
26120
26120
  return Ba && this.playWinFeedback(), this.updateHistoryWithBet({ id: Kt.id, amount: Kt.amount.toNumber(), payout: Kt.payout.toNumber() }), await this.waitForAnimationsComplete(Ba), { pnl: Kt.payout.minus(Kt.amount), gameOutcome: Ca, hasError: !1 };
26121
26121
  }
26122
26122
  async toggleAutobet(he) {
26123
- this.autobetSelectedTiles.length !== 0 ? await super.toggleAutobet(he) : this.emit("show-alert", { detail: { type: "error", message: l$1("games.mines.selectTileToAutobet", this.gameData.language) } });
26123
+ this.autobetSelectedTiles.length !== 0 ? await super.toggleAutobet(he) : this.showError(l$1("games.mines.selectTileToAutobet", this.gameData.language));
26124
26124
  }
26125
26125
  async minesManualStart() {
26126
26126
  this.isLoading = !0, this.minesData = null;
@@ -26146,7 +26146,7 @@ let MinesGame = class extends xt {
26146
26146
  this.loadingTiles = [...this.loadingTiles, he];
26147
26147
  try {
26148
26148
  const Ct = await this.getMinesApi().selectTile({ betId: this.minesData.id, selectedTiles: [he] });
26149
- if (!Ct.success) return void this.emit("show-alert", { detail: { type: "error", message: l$1($h(Ct.errorCode), this.gameData.language) } });
26149
+ if (!Ct.success) return void this.showError(l$1($h(Ct.errorCode), this.gameData.language));
26150
26150
  this.minesData = mergeSelectTileResponse(this.minesData, Ct), Ct.state.mineLocations.includes(he) ? this.playTileSound("bomb") : this.playGemReveal(Ct.state.numGemsFound, MINES_TILES_COUNT - this.minesCount), Ct.settled && (this.gameData.updateBalance(Ct.afterBalance), Ct.state.outcome === MinesGameOutcome.WIN && this.playWinFeedback(), this.updateHistoryWithBet({ id: Ct.id, amount: Ct.amount.toNumber(), payout: Ct.payout.toNumber() }));
26151
26151
  } finally {
26152
26152
  this.loadingTiles = this.loadingTiles.filter((Ct) => Ct !== he);
@@ -26157,7 +26157,7 @@ let MinesGame = class extends xt {
26157
26157
  this.isLoading = !0;
26158
26158
  try {
26159
26159
  const he = await this.getMinesApi().cashout();
26160
- if (!he.success) return void this.emit("show-alert", { detail: { type: "error", message: l$1($h(he.errorCode), this.gameData.language) } });
26160
+ if (!he.success) return void this.showError(l$1($h(he.errorCode), this.gameData.language));
26161
26161
  this.gameData.updateBalance(he.afterBalance), this.minesData = he, he.state.outcome === MinesGameOutcome.WIN && this.playWinFeedback(), this.updateHistoryWithBet({ id: he.id, amount: he.amount.toNumber(), payout: he.payout.toNumber() });
26162
26162
  } finally {
26163
26163
  this.isLoading = !1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betorigami/games",
3
- "version": "3.2.6",
3
+ "version": "3.2.7",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",