@jetthai/cuora 1.1.428 → 1.1.429-dev.0
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/.claude/settings.local.json +3 -1
- package/.prettierignore +2 -1
- package/CHANGELOG.md +118 -3
- package/docs/kibana/crypto-way-deposit-amount-bug-analysis.md +1003 -0
- package/docs/kibana/play-providerId-error.md +202 -0
- package/docs/kibana/play-selectedWalletType.md +1 -0
- package/docs/kibana/play-selectedWalletType_2.md +1 -0
- package/docs/kibana/play-selectedWalletType_analysis.md +565 -0
- package/package.json +1 -1
- package/scripts/auto-version.js +1 -0
- package/src/api/activity.js +5 -0
- package/src/machine/deposit/crypto_way_cash.js +26 -4
- package/src/machine/game_v2_1.js +6 -4
- package/src/machine/withdraw/withdraw_manual_cash.js +1 -1
package/src/machine/game_v2_1.js
CHANGED
|
@@ -465,8 +465,10 @@ export default function (request) {
|
|
|
465
465
|
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name, gameName } = context.switchGame
|
|
466
466
|
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name, gameName } }
|
|
467
467
|
}),
|
|
468
|
+
// 頁面刷新或深層連結時,event.data.walletType 可能為 undefined/null
|
|
469
|
+
// 使用 ?? 確保不會覆蓋 context 中已有的 walletType,避免後端收到 selectedWalletType=null
|
|
468
470
|
setWalletType: assign((context, event) => {
|
|
469
|
-
return { walletType: event.data.walletType }
|
|
471
|
+
return { walletType: event.data.walletType ?? context.walletType }
|
|
470
472
|
}),
|
|
471
473
|
setLang: assign((context, event) => {
|
|
472
474
|
const lang = event.data.locale.replace('-', '_')
|
|
@@ -638,9 +640,9 @@ export default function (request) {
|
|
|
638
640
|
}
|
|
639
641
|
},
|
|
640
642
|
connectGame: async (context, event) => {
|
|
641
|
-
// [防呆] 確保有 providerId 和 gameId
|
|
643
|
+
// [防呆] 確保有 providerId 和 gameId(含字串 "null"/"undefined" 檢查)
|
|
642
644
|
const { providerId, gameId } = context.game || {}
|
|
643
|
-
if (!providerId || !gameId) {
|
|
645
|
+
if (!providerId || !gameId || providerId === 'null' || providerId === 'undefined' || gameId === 'null' || gameId === 'undefined') {
|
|
644
646
|
return
|
|
645
647
|
}
|
|
646
648
|
const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
|
|
@@ -654,7 +656,7 @@ export default function (request) {
|
|
|
654
656
|
is_demo: false,
|
|
655
657
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
656
658
|
lang,
|
|
657
|
-
selected_wallet_type: walletType,
|
|
659
|
+
selected_wallet_type: walletType || null, // 統一 undefined → null,確保後端收到一致的值
|
|
658
660
|
return_url: returnProviders.includes(providerId)
|
|
659
661
|
? `${window.location.origin}${context.base}return`
|
|
660
662
|
: window.location.href?.split('?')?.[0], // For providers to return.
|