@jetthai/cuora 1.1.428-dev.1 → 1.1.428
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 +1 -3
- package/.prettierignore +1 -2
- package/CHANGELOG.md +3 -94
- package/package.json +1 -1
- package/scripts/auto-version.js +0 -1
- package/src/api/activity.js +0 -5
- package/src/machine/deposit/crypto_way_cash.js +4 -26
- package/src/machine/game_v2_1.js +2 -4
- package/docs/kibana/crypto-way-deposit-amount-bug-analysis.md +0 -1003
- package/docs/kibana/play-selectedWalletType.md +0 -1
- package/docs/kibana/play-selectedWalletType_2.md +0 -1
- package/docs/kibana/play-selectedWalletType_analysis.md +0 -565
package/.prettierignore
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
dist/
|
|
2
|
-
CHANGELOG.md
|
|
1
|
+
dist/
|
package/CHANGELOG.md
CHANGED
|
@@ -2,32 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
### [1.1.428
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Bug Fixes
|
|
9
|
-
|
|
10
|
-
* **game:** 防止 selectedWalletType 為 null 送至後端 ([e62d195](https://github.com/jetthai/cuora-module/commit/e62d195cc12a0ec1021480e4c76b62005925da54))
|
|
11
|
-
|
|
12
|
-
### [1.1.428-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.428-dev.0) (2026-04-13)
|
|
13
|
-
|
|
5
|
+
### [1.1.428](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.428) (2026-04-13)
|
|
14
6
|
|
|
15
7
|
### Features
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Bug Fixes
|
|
21
|
-
|
|
22
|
-
* **deposit:** 修正 crypto_way_cash 計算失敗狀態及提交金額驗證 ([726c449](https://github.com/jetthai/cuora-module/commit/726c4493267b6ca502fc241385b251f6caaf84b5))
|
|
23
|
-
* **deposit:** 強化 crypto_way_cash isSubmittable guard 的金額驗證 ([9361a5c](https://github.com/jetthai/cuora-module/commit/9361a5cc37bb0d7d65144b875baecced7f7e0f9f))
|
|
24
|
-
* **deposit:** 防止 crypto_way_cash 金額輸入 NaN 及負數 ([608da8a](https://github.com/jetthai/cuora-module/commit/608da8a35dc111ee3e7e9fccea94a366d1b99599))
|
|
25
|
-
|
|
26
|
-
### [1.1.427-dev.5](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.427-dev.5) (2026-04-12)
|
|
27
|
-
|
|
28
|
-
### [1.1.427-dev.4](https://github.com/jetthai/cuora-module/compare/v1.1.427-dev.0...v1.1.427-dev.4) (2026-04-12)
|
|
29
|
-
|
|
30
|
-
### [1.1.427-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.427-dev.0) (2026-04-12)
|
|
9
|
+
- **husky:** skip pre-push hooks on force push to dev/qa ([79e9df9](https://github.com/jetthai/cuora-module/commit/79e9df9bfd9335dca7d5aec590fa25d7580586ac))
|
|
31
10
|
|
|
32
11
|
### [1.1.427](https://github.com/jetthai/cuora-module/compare/v1.1.426...v1.1.427) (2026-04-07)
|
|
33
12
|
|
|
@@ -47,77 +26,7 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
47
26
|
|
|
48
27
|
### [1.1.424](https://github.com/jetthai/cuora-module/compare/v1.1.423...v1.1.424) (2026-03-17)
|
|
49
28
|
|
|
50
|
-
### [1.1.
|
|
51
|
-
|
|
52
|
-
### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
|
|
53
|
-
|
|
54
|
-
### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
|
|
55
|
-
|
|
56
|
-
### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
|
|
57
|
-
|
|
58
|
-
### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
|
|
59
|
-
|
|
60
|
-
### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
|
|
61
|
-
|
|
62
|
-
### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
|
|
63
|
-
|
|
64
|
-
### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
|
|
65
|
-
|
|
66
|
-
### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
|
|
67
|
-
|
|
68
|
-
### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
|
|
69
|
-
|
|
70
|
-
### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
|
|
71
|
-
|
|
72
|
-
### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
|
|
73
|
-
|
|
74
|
-
### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
|
|
75
|
-
|
|
76
|
-
### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
|
|
77
|
-
|
|
78
|
-
### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
|
|
79
|
-
|
|
80
|
-
### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
|
|
81
|
-
|
|
82
|
-
### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
|
|
83
|
-
|
|
84
|
-
### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
|
|
85
|
-
|
|
86
|
-
### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
|
|
87
|
-
|
|
88
|
-
### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
|
|
89
|
-
|
|
90
|
-
### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
|
|
91
|
-
|
|
92
|
-
### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
|
|
93
|
-
|
|
94
|
-
### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
|
|
95
|
-
|
|
96
|
-
### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
|
|
97
|
-
|
|
98
|
-
### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
|
|
99
|
-
|
|
100
|
-
### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
|
|
101
|
-
|
|
102
|
-
### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
|
|
103
|
-
|
|
104
|
-
### [1.1.422-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.422-dev-1...v1.1.422-dev-2) (2026-03-17)
|
|
105
|
-
|
|
106
|
-
### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
|
|
107
|
-
|
|
108
|
-
### [1.1.413-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-10...v1.1.413-dev-11) (2026-03-12)
|
|
109
|
-
|
|
110
|
-
### [1.1.413-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.413-dev-9...v1.1.413-dev-10) (2026-03-11)
|
|
111
|
-
|
|
112
|
-
### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
|
|
113
|
-
|
|
114
|
-
### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
|
|
115
|
-
|
|
116
|
-
### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
|
|
117
|
-
|
|
118
|
-
### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
|
|
119
|
-
|
|
120
|
-
### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
|
|
29
|
+
### [1.1.423](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.423) (2026-03-17)
|
|
121
30
|
|
|
122
31
|
### [1.1.422](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.422) (2026-03-16)
|
|
123
32
|
|
package/package.json
CHANGED
package/scripts/auto-version.js
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -120,9 +120,4 @@ export default {
|
|
|
120
120
|
method: 'post',
|
|
121
121
|
params: { startDate, endDate, appSecret },
|
|
122
122
|
}),
|
|
123
|
-
getMissionHistory: ({ activityNo, appSecret }) => ({
|
|
124
|
-
url: 'activities/mission-history',
|
|
125
|
-
method: 'get',
|
|
126
|
-
params: { activityNo, appSecret },
|
|
127
|
-
}),
|
|
128
123
|
}
|
|
@@ -56,9 +56,8 @@ export default function (request, context) {
|
|
|
56
56
|
target: 'calculated',
|
|
57
57
|
actions: 'setCalculation',
|
|
58
58
|
},
|
|
59
|
-
// 計算失敗回到 loaded,避免進入 calculated 造成 UI 與 state 不一致
|
|
60
59
|
onError: {
|
|
61
|
-
target: '
|
|
60
|
+
target: 'calculated',
|
|
62
61
|
},
|
|
63
62
|
},
|
|
64
63
|
},
|
|
@@ -168,22 +167,14 @@ export default function (request, context) {
|
|
|
168
167
|
setAmount: assign((context, event) => {
|
|
169
168
|
// 現金網可自由填額度,grandTotalEnable 欄位感覺不再需要?
|
|
170
169
|
if (context.selectedCrypto?.grandTotalEnable === 1) {
|
|
171
|
-
// 累加模式:用 Math.max 確保累加結果不低於 0
|
|
172
|
-
const result = preciseAdd(`${parseFloat(context.selectedAmount || 0)}`, `${parseFloat(event.data)}`)
|
|
173
170
|
return {
|
|
174
|
-
selectedAmount:
|
|
171
|
+
selectedAmount: preciseAdd(`${parseFloat(context.selectedAmount || 0)}`, `${parseFloat(event.data)}`),
|
|
175
172
|
}
|
|
176
173
|
} else {
|
|
177
|
-
// 直接設定模式:拒絕 NaN 及負數,返回空物件使 context 不變
|
|
178
|
-
const val = parseFloat(event.data)
|
|
179
|
-
if (isNaN(val) || val < 0) return {}
|
|
180
174
|
return { selectedAmount: event.data }
|
|
181
175
|
}
|
|
182
176
|
}),
|
|
183
177
|
inputAmount: assign((context, event) => {
|
|
184
|
-
// 驗證輸入值:NaN 或負數時忽略此次輸入
|
|
185
|
-
const val = parseFloat(event.data)
|
|
186
|
-
if (isNaN(val) || val < 0) return {}
|
|
187
178
|
return { selectedAmount: event.data }
|
|
188
179
|
}),
|
|
189
180
|
setAddress: assign((context, event) => {
|
|
@@ -240,17 +231,9 @@ export default function (request, context) {
|
|
|
240
231
|
const { selectedCrypto, selectedAmount } = context
|
|
241
232
|
return selectedCrypto && selectedAmount && selectedCrypto.minimum <= +selectedAmount && +selectedAmount <= selectedCrypto.maximum
|
|
242
233
|
},
|
|
243
|
-
// 提交前最後一道 guard:重新驗證 amount 的合法性(與 isCalculable 同等嚴格)
|
|
244
234
|
isSubmittable: (context, event) => {
|
|
245
235
|
const { selectedCrypto, selectedAmount, calculation } = context
|
|
246
|
-
return
|
|
247
|
-
selectedCrypto &&
|
|
248
|
-
selectedAmount &&
|
|
249
|
-
+selectedAmount > 0 &&
|
|
250
|
-
selectedCrypto.minimum <= +selectedAmount &&
|
|
251
|
-
+selectedAmount <= selectedCrypto.maximum &&
|
|
252
|
-
calculation
|
|
253
|
-
)
|
|
236
|
+
return selectedCrypto && selectedAmount && calculation
|
|
254
237
|
},
|
|
255
238
|
},
|
|
256
239
|
services: {
|
|
@@ -267,15 +250,10 @@ export default function (request, context) {
|
|
|
267
250
|
},
|
|
268
251
|
submitDeposit: async (context, event) => {
|
|
269
252
|
const { selectedCrypto, selectedAmount, sourceAddress, promotion } = context
|
|
270
|
-
// 防禦性檢查:將 amount 轉為數字型別,並驗證範圍合法性,避免非法金額送出 API
|
|
271
|
-
const amount = +selectedAmount
|
|
272
|
-
if (!amount || amount <= 0 || amount < selectedCrypto.minimum || amount > selectedCrypto.maximum) {
|
|
273
|
-
throw new Error('INVALID_AMOUNT')
|
|
274
|
-
}
|
|
275
253
|
return await request.send(
|
|
276
254
|
payment.submitDepositTransactionCrypto({
|
|
277
255
|
method: selectedCrypto.method,
|
|
278
|
-
amount:
|
|
256
|
+
amount: selectedAmount,
|
|
279
257
|
cryptoCurrency: selectedCrypto.channel,
|
|
280
258
|
cryptoNetwork: selectedCrypto.networkCode,
|
|
281
259
|
sourceAddress: sourceAddress,
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -465,10 +465,8 @@ 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
|
|
470
468
|
setWalletType: assign((context, event) => {
|
|
471
|
-
return { walletType: event.data.walletType
|
|
469
|
+
return { walletType: event.data.walletType }
|
|
472
470
|
}),
|
|
473
471
|
setLang: assign((context, event) => {
|
|
474
472
|
const lang = event.data.locale.replace('-', '_')
|
|
@@ -656,7 +654,7 @@ export default function (request) {
|
|
|
656
654
|
is_demo: false,
|
|
657
655
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
658
656
|
lang,
|
|
659
|
-
selected_wallet_type: walletType
|
|
657
|
+
selected_wallet_type: walletType,
|
|
660
658
|
return_url: returnProviders.includes(providerId)
|
|
661
659
|
? `${window.location.origin}${context.base}return`
|
|
662
660
|
: window.location.href?.split('?')?.[0], // For providers to return.
|