@jetthai/cuora 1.1.430-dev.0 → 1.1.430

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.
@@ -17,9 +17,7 @@
17
17
  "mcp__sentry__get_issue_details",
18
18
  "mcp__sentry__search_issues",
19
19
  "Bash(git add:*)",
20
- "Bash(git commit:*)",
21
- "Bash(git branch:*)",
22
- "Bash(git merge:*)"
20
+ "Bash(git commit:*)"
23
21
  ]
24
22
  }
25
23
  }
package/.prettierignore CHANGED
@@ -1,2 +1 @@
1
- dist/
2
- CHANGELOG.md
1
+ dist/
package/CHANGELOG.md CHANGED
@@ -2,64 +2,27 @@
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.430-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.431-dev.0...v1.1.430-dev.0) (2026-04-28)
5
+ ### [1.1.430](https://github.com/jetthai/cuora-module/compare/v1.1.427-hotfix.1...v1.1.430) (2026-04-14)
6
6
 
7
+ ### [1.1.429](https://github.com/jetthai/cuora-module/compare/v1.1.428...v1.1.429) (2026-04-14)
7
8
 
8
9
  ### Bug Fixes
9
10
 
10
- * **deposit:** 修正 crypto_way_cash inputAmount 清空時未重置狀態 ([2630a06](https://github.com/jetthai/cuora-module/commit/2630a060b0a43d27a0a727c0e0e5efe0306b2ca9))
11
- * **deposit:** 修正 crypto_way_cash setAmount 清空時未重置狀態 ([2fc0c08](https://github.com/jetthai/cuora-module/commit/2fc0c08d3e49e321319bef27bcdb52b4491a98a0))
11
+ - **withdraw:** 修正加密貨幣提款計算錯誤時的狀態轉移 ([5fe9d9e](https://github.com/jetthai/cuora-module/commit/5fe9d9e32ec101c8054dd3c006d76f52616b436b))
12
12
 
13
- ### [1.1.429-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.429-dev.0) (2026-04-14)
14
-
15
-
16
- ### Features
17
-
18
- * **husky:** skip pre-push hooks on force push to dev/qa ([79e9df9](https://github.com/jetthai/cuora-module/commit/79e9df9bfd9335dca7d5aec590fa25d7580586ac))
13
+ ### [1.1.428](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.428) (2026-04-13)
19
14
 
15
+ ### [1.1.429](https://github.com/jetthai/cuora-module/compare/v1.1.428...v1.1.429) (2026-04-14)
20
16
 
21
17
  ### Bug Fixes
22
18
 
23
- * **deposit:** 修正 crypto_way_cash 計算失敗狀態及提交金額驗證 ([726c449](https://github.com/jetthai/cuora-module/commit/726c4493267b6ca502fc241385b251f6caaf84b5))
24
- * **deposit:** 強化 crypto_way_cash isSubmittable guard 的金額驗證 ([9361a5c](https://github.com/jetthai/cuora-module/commit/9361a5cc37bb0d7d65144b875baecced7f7e0f9f))
25
- * **deposit:** 防止 crypto_way_cash 金額輸入 NaN 及負數 ([608da8a](https://github.com/jetthai/cuora-module/commit/608da8a35dc111ee3e7e9fccea94a366d1b99599))
26
- * **game:** 防止 connectGame 將字串 "null" 的 providerId 送至後端 ([6bd8b60](https://github.com/jetthai/cuora-module/commit/6bd8b6017f351bd53295abb494835c66c65561fe))
27
- * **game:** 防止 selectedWalletType 為 null 送至後端 ([e62d195](https://github.com/jetthai/cuora-module/commit/e62d195cc12a0ec1021480e4c76b62005925da54))
28
- * **withdraw:** 修正法幣提款計算錯誤時的狀態轉移 ([a951ba8](https://github.com/jetthai/cuora-module/commit/a951ba803cccd1564a7dbe2645ea7c8d50f7da31))
29
-
30
- ### [1.1.428-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.428-dev.1...v1.1.428-dev.2) (2026-04-13)
31
-
32
-
33
- ### Bug Fixes
34
-
35
- * **game:** 防止 connectGame 將字串 "null" 的 providerId 送至後端 ([6bd8b60](https://github.com/jetthai/cuora-module/commit/6bd8b6017f351bd53295abb494835c66c65561fe))
36
-
37
- ### [1.1.428-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.428-dev.0...v1.1.428-dev.1) (2026-04-13)
38
-
39
-
40
- ### Bug Fixes
41
-
42
- * **game:** 防止 selectedWalletType 為 null 送至後端 ([e62d195](https://github.com/jetthai/cuora-module/commit/e62d195cc12a0ec1021480e4c76b62005925da54))
43
-
44
- ### [1.1.428-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.428-dev.0) (2026-04-13)
19
+ - **withdraw:** 修正加密貨幣提款計算錯誤時的狀態轉移 ([5fe9d9e](https://github.com/jetthai/cuora-module/commit/5fe9d9e32ec101c8054dd3c006d76f52616b436b))
45
20
 
21
+ ### [1.1.428](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.428) (2026-04-13)
46
22
 
47
23
  ### Features
48
24
 
49
- * **husky:** skip pre-push hooks on force push to dev/qa ([79e9df9](https://github.com/jetthai/cuora-module/commit/79e9df9bfd9335dca7d5aec590fa25d7580586ac))
50
-
51
-
52
- ### Bug Fixes
53
-
54
- * **deposit:** 修正 crypto_way_cash 計算失敗狀態及提交金額驗證 ([726c449](https://github.com/jetthai/cuora-module/commit/726c4493267b6ca502fc241385b251f6caaf84b5))
55
- * **deposit:** 強化 crypto_way_cash isSubmittable guard 的金額驗證 ([9361a5c](https://github.com/jetthai/cuora-module/commit/9361a5cc37bb0d7d65144b875baecced7f7e0f9f))
56
- * **deposit:** 防止 crypto_way_cash 金額輸入 NaN 及負數 ([608da8a](https://github.com/jetthai/cuora-module/commit/608da8a35dc111ee3e7e9fccea94a366d1b99599))
57
-
58
- ### [1.1.427-dev.5](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.427-dev.5) (2026-04-12)
59
-
60
- ### [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)
61
-
62
- ### [1.1.427-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.427...v1.1.427-dev.0) (2026-04-12)
25
+ - **husky:** skip pre-push hooks on force push to dev/qa ([79e9df9](https://github.com/jetthai/cuora-module/commit/79e9df9bfd9335dca7d5aec590fa25d7580586ac))
63
26
 
64
27
  ### [1.1.427](https://github.com/jetthai/cuora-module/compare/v1.1.426...v1.1.427) (2026-04-07)
65
28
 
@@ -79,77 +42,7 @@ All notable changes to this project will be documented in this file. See [standa
79
42
 
80
43
  ### [1.1.424](https://github.com/jetthai/cuora-module/compare/v1.1.423...v1.1.424) (2026-03-17)
81
44
 
82
- ### [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)
83
-
84
- ### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
85
-
86
- ### [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)
87
-
88
- ### [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)
89
-
90
- ### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
91
-
92
- ### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
93
-
94
- ### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
95
-
96
- ### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
97
-
98
- ### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
99
-
100
- ### [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)
101
-
102
- ### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
103
-
104
- ### [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)
105
-
106
- ### [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)
107
-
108
- ### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
109
-
110
- ### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
111
-
112
- ### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
113
-
114
- ### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
115
-
116
- ### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
117
-
118
- ### [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)
119
-
120
- ### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
121
-
122
- ### [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)
123
-
124
- ### [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)
125
-
126
- ### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
127
-
128
- ### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
129
-
130
- ### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
131
-
132
- ### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
133
-
134
- ### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
135
-
136
- ### [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)
137
-
138
- ### [1.1.422-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.422-dev-1) (2026-03-16)
139
-
140
- ### [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)
141
-
142
- ### [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)
143
-
144
- ### [1.1.413-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.413-dev-9) (2026-03-11)
145
-
146
- ### [1.1.413-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.420...v1.1.413-dev-8) (2026-03-10)
147
-
148
- ### [1.1.413-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.413-6...v1.1.413-dev-7) (2026-03-06)
149
-
150
- ### [1.1.413-6](https://github.com/jetthai/cuora-module/compare/v1.1.416...v1.1.413-6) (2026-03-06)
151
-
152
- ### [1.1.413-5](https://github.com/jetthai/cuora-module/compare/v1.1.413...v1.1.413-5) (2026-03-05)
45
+ ### [1.1.423](https://github.com/jetthai/cuora-module/compare/v1.1.422...v1.1.423) (2026-03-17)
153
46
 
154
47
  ### [1.1.422](https://github.com/jetthai/cuora-module/compare/v1.1.421...v1.1.422) (2026-03-16)
155
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.430-dev.0",
3
+ "version": "1.1.430",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- // Copyright 2024 The Terasology Foundation
3
2
 
4
3
  // dev/qa 分支自動計算下一個 prerelease 版號
5
4
  // 版號格式:{master 版號}-{分支名}.{遞增編號}
@@ -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
  }
@@ -476,9 +476,6 @@ export default function (request) {
476
476
 
477
477
  const affiliateCode = storage.get('ac')
478
478
  const nickname = storage.get('nk')
479
- const phone = storage.get('tp_phone')
480
- const countryCode = storage.get('tp_countryCode')
481
- const email = storage.get('tp_email')
482
479
  const messages = {
483
480
  url: window.location.href,
484
481
  channelOrders: [
@@ -500,25 +497,9 @@ export default function (request) {
500
497
  referralObj.nick_name = nickname
501
498
  }
502
499
 
503
- if (![undefined, 'undefined', null, 'null'].includes(phone)) {
504
- referralObj.phone = phone
505
- }
506
-
507
- if (![undefined, 'undefined', null, 'null'].includes(countryCode)) {
508
- referralObj.countryCode = countryCode
509
- }
510
-
511
- if (![undefined, 'undefined', null, 'null'].includes(email)) {
512
- referralObj.email = email
513
- }
514
-
515
500
  referralObj.channel = storage.get('channel') || defaultChannel || channel
516
501
  referralObj.subchannel = storage.get('subchannel') || defaultSubchannel || subchannel
517
502
 
518
- storage.remove('tp_phone')
519
- storage.remove('tp_countryCode')
520
- storage.remove('tp_email')
521
-
522
503
  const fullURL = request.config.fullURL
523
504
 
524
505
  const redirectURL = urljoin(
@@ -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: 'loaded',
60
+ target: 'calculated',
62
61
  },
63
62
  },
64
63
  },
@@ -168,10 +167,8 @@ 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 || '0')}`)
173
170
  return {
174
- selectedAmount: Math.max(result, 0),
171
+ selectedAmount: preciseAdd(`${parseFloat(context.selectedAmount || 0)}`, `${parseFloat(event.data)}`),
175
172
  }
176
173
  } else {
177
174
  return { selectedAmount: event.data }
@@ -234,17 +231,9 @@ export default function (request, context) {
234
231
  const { selectedCrypto, selectedAmount } = context
235
232
  return selectedCrypto && selectedAmount && selectedCrypto.minimum <= +selectedAmount && +selectedAmount <= selectedCrypto.maximum
236
233
  },
237
- // 提交前最後一道 guard:重新驗證 amount 的合法性(與 isCalculable 同等嚴格)
238
234
  isSubmittable: (context, event) => {
239
235
  const { selectedCrypto, selectedAmount, calculation } = context
240
- return (
241
- selectedCrypto &&
242
- selectedAmount &&
243
- +selectedAmount > 0 &&
244
- selectedCrypto.minimum <= +selectedAmount &&
245
- +selectedAmount <= selectedCrypto.maximum &&
246
- calculation
247
- )
236
+ return selectedCrypto && selectedAmount && calculation
248
237
  },
249
238
  },
250
239
  services: {
@@ -261,15 +250,10 @@ export default function (request, context) {
261
250
  },
262
251
  submitDeposit: async (context, event) => {
263
252
  const { selectedCrypto, selectedAmount, sourceAddress, promotion } = context
264
- // 防禦性檢查:將 amount 轉為數字型別,並驗證範圍合法性,避免非法金額送出 API
265
- const amount = +selectedAmount
266
- if (!amount || amount <= 0 || amount < selectedCrypto.minimum || amount > selectedCrypto.maximum) {
267
- throw new Error('INVALID_AMOUNT')
268
- }
269
253
  return await request.send(
270
254
  payment.submitDepositTransactionCrypto({
271
255
  method: selectedCrypto.method,
272
- amount: amount,
256
+ amount: selectedAmount,
273
257
  cryptoCurrency: selectedCrypto.channel,
274
258
  cryptoNetwork: selectedCrypto.networkCode,
275
259
  sourceAddress: sourceAddress,
@@ -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 ?? context.walletType }
469
+ return { walletType: event.data.walletType }
472
470
  }),
473
471
  setLang: assign((context, event) => {
474
472
  const lang = event.data.locale.replace('-', '_')
@@ -640,9 +638,9 @@ export default function (request) {
640
638
  }
641
639
  },
642
640
  connectGame: async (context, event) => {
643
- // [防呆] 確保有 providerId 和 gameId(含字串 "null"/"undefined" 檢查)
641
+ // [防呆] 確保有 providerId 和 gameId
644
642
  const { providerId, gameId } = context.game || {}
645
- if (!providerId || !gameId || providerId === 'null' || providerId === 'undefined' || gameId === 'null' || gameId === 'undefined') {
643
+ if (!providerId || !gameId) {
646
644
  return
647
645
  }
648
646
  const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
@@ -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 || null, // 統一 undefined → null,確保後端收到一致的值
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.