@jetthai/cuora 1.1.361-dev-11 → 1.1.361

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/CHANGELOG.md CHANGED
@@ -2,16 +2,6 @@
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.361-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev-10...v1.1.361-dev-11) (2025-06-20)
6
-
7
- ### [1.1.361-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev...v1.1.361-dev-10) (2025-06-20)
8
-
9
- ### [1.1.361-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev...v1.1.361-dev-2) (2025-06-20)
10
-
11
- ### [1.1.361-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.361-dev...v1.1.361-dev-1) (2025-06-20)
12
-
13
- ### [1.1.361-dev](https://github.com/jetthai/cuora-module/compare/v1.1.361...v1.1.361-dev) (2025-06-20)
14
-
15
5
  ### [1.1.361](https://github.com/jetthai/cuora-module/compare/v1.1.360...v1.1.361) (2025-06-03)
16
6
 
17
7
  ### [1.1.360](https://github.com/jetthai/cuora-module/compare/v1.1.359...v1.1.360) (2025-06-03)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.361-dev-11",
3
+ "version": "1.1.361",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -69,10 +69,10 @@ export default {
69
69
  method: 'get',
70
70
  params: { rewardType },
71
71
  }),
72
- getRewardList: ({ rewardType, count, appSecret, orderColum, lang }) => ({
72
+ getRewardList: ({ rewardType, count, appSecret, orderColumn }) => ({
73
73
  url: 'activities/rewards',
74
74
  method: 'get',
75
- params: { rewardType, count, appSecret, orderColum, lang },
75
+ params: { rewardType, count, appSecret, orderColumn },
76
76
  }),
77
77
  getCashRainReward: ({ activityNo, appSecret }) => ({
78
78
  url: `activities/cashRain`,
package/src/api/game.js CHANGED
@@ -99,16 +99,4 @@ export default {
99
99
  getFreeGameList: () => ({ method: 'get', url: 'activities/getFreeGameRewardList' }),
100
100
  getFreeGameReward: ({ activityNo, receiveNo }) => ({ method: 'post', url: 'activities/getFreeGameReward', params: { activityNo, receiveNo } }),
101
101
  getV3GameInfo: ({ appSecret, gameCodes }) => ({ method: 'post', url: 'game/list/v3/gameInfo', params: { appSecret, gameCodes } }),
102
- getProvableResult: ({ providerId, seqNo, lang, uidSite, appSecret }) => ({
103
- method: 'get',
104
- url: 'game/provable-result',
105
- params: { providerId, seqNo, lang, uidSite, appSecret },
106
- isPublic: true,
107
- }),
108
- getBetslip: ({ providerId, seqNo, lang, appSecret }) => ({
109
- method: 'get',
110
- url: 'game/betslip',
111
- params: { providerId, seqNo, lang, appSecret },
112
- isPublic: true,
113
- }),
114
102
  }
@@ -19,8 +19,6 @@ export default {
19
19
  lastNameTh,
20
20
  firstNameEn,
21
21
  lastNameEn,
22
- firstNameLocale,
23
- lastNameLocale,
24
22
  bonus,
25
23
  paymentProvider,
26
24
  pixType,
@@ -43,8 +41,6 @@ export default {
43
41
  lastNameTh,
44
42
  firstNameEn,
45
43
  lastNameEn,
46
- firstNameLocale,
47
- lastNameLocale,
48
44
  bonus,
49
45
  paymentProvider,
50
46
  pixType,
@@ -27,8 +27,6 @@ export default function (request) {
27
27
  branchCode: null,
28
28
  accountNumber: null,
29
29
  holderName: null,
30
- lastNameLocale: null,
31
- firstNameLocale: null,
32
30
  pixType: null,
33
31
  },
34
32
  states: {
@@ -116,20 +114,6 @@ export default function (request) {
116
114
  }
117
115
  }),
118
116
  },
119
- SET_FIRST_NAME: {
120
- actions: assign((context, event) => {
121
- return {
122
- firstNameLocale: event.data,
123
- }
124
- }),
125
- },
126
- SET_LAST_NAME: {
127
- actions: assign((context, event) => {
128
- return {
129
- lastNameLocale: event.data,
130
- }
131
- }),
132
- },
133
117
  SET_PIX_TYPE: {
134
118
  actions: assign((context, event) => {
135
119
  return {
@@ -172,8 +156,6 @@ export default function (request) {
172
156
  return {
173
157
  hasAnyAccount: bankInfo.length > 0,
174
158
  holderName: bankInfo[0]?.holderName,
175
- firstNameLocale: bankInfo[0]?.firstNameLocale || null,
176
- lastNameLocale: bankInfo[0]?.lastNameLocale || null,
177
159
  paymentList,
178
160
  bank: null, // 不預選銀行,玩家可能不知道這裡可以選 by Gordan
179
161
  }
@@ -185,21 +167,21 @@ export default function (request) {
185
167
 
186
168
  if (bindingType === 'CRYPTO') {
187
169
  // 虛擬貨幣
188
- const { crypto, network, cryptoAddress, holderName, firstNameLocale, lastNameLocale } = context
189
- return crypto && network && cryptoAddress && (holderName || (firstNameLocale && lastNameLocale))
170
+ const { crypto, network, cryptoAddress, holderName } = context
171
+ return crypto && network && cryptoAddress && holderName
190
172
  } else if (bindingType === 'EWALLET') {
191
173
  // 電子錢包
192
- const { walletCode, accountNumber, holderName, firstNameLocale, lastNameLocale } = context
193
- return walletCode?.bankCode && accountNumber && (holderName || (firstNameLocale && lastNameLocale))
174
+ const { walletCode, accountNumber, holderName } = context
175
+ return walletCode?.bankCode && accountNumber && holderName
194
176
  } else {
195
177
  // 一般銀行
196
178
  if (currency === 'INR') {
197
179
  // 如果是印度幣別
198
- const { bank, ifscCode, accountNumber, branch, holderName, firstNameLocale, lastNameLocale } = context
199
- return bank.bankCode && ifscCode && accountNumber && branch && (holderName || (firstNameLocale && lastNameLocale))
180
+ const { bank, ifscCode, accountNumber, branch, holderName } = context
181
+ return bank.bankCode && ifscCode && accountNumber && branch && holderName
200
182
  } else {
201
- const { bank, accountNumber, branch, holderName, firstNameLocale, lastNameLocale } = context
202
- return bank.bankCode && accountNumber && branch && (holderName || (firstNameLocale && lastNameLocale))
183
+ const { bank, accountNumber, branch, holderName } = context
184
+ return bank.bankCode && accountNumber && branch && holderName
203
185
  }
204
186
  }
205
187
  },
@@ -213,22 +195,8 @@ export default function (request) {
213
195
  return { paymentList, paymentInfo }
214
196
  },
215
197
  updatePaymentInfo: async (context, event) => {
216
- const {
217
- bindingType,
218
- bank,
219
- ifscCode,
220
- crypto,
221
- network,
222
- cryptoAddress,
223
- walletCode,
224
- branch,
225
- branchCode,
226
- accountNumber,
227
- holderName,
228
- firstNameLocale,
229
- lastNameLocale,
230
- pixType,
231
- } = context
198
+ const { bindingType, bank, ifscCode, crypto, network, cryptoAddress, walletCode, branch, branchCode, accountNumber, holderName, pixType } =
199
+ context
232
200
  return await request.send(
233
201
  payment.updatePaymentInfo({
234
202
  bindingType,
@@ -242,8 +210,6 @@ export default function (request) {
242
210
  branchCode,
243
211
  bankAccount: accountNumber,
244
212
  holderName,
245
- firstNameLocale,
246
- lastNameLocale,
247
213
  pixType,
248
214
  })
249
215
  )
@@ -3,7 +3,6 @@ import { assign, createMachine } from 'xstate'
3
3
  import pickBy from 'lodash/pickBy.js'
4
4
  import api from '../api/common.js'
5
5
  import storage from '../util/storage.js'
6
- import sessionStorage from '../util/sessionStorage.js'
7
6
 
8
7
  export default function (request) {
9
8
  const { appSecret, defaultChannel, defaultSubchannel } = request.config
@@ -259,7 +258,7 @@ export default function (request) {
259
258
  const channel = urlParams.get('channel') || storage.get('channel') || defaultChannel || 'official'
260
259
  const subchannel = urlParams.get('subchannel') || storage.get('subchannel') || defaultSubchannel || 'pwa'
261
260
  const affiliateCode = urlParams.get('ac') || urlParams.get('referralCode') || storage.get('ac') || storage.get('referralCode')
262
- const friendCode = urlParams.get('fc') || urlParams.get('affiliate') || sessionStorage.get('fc') || sessionStorage.get('affiliate')
261
+ const friendCode = urlParams.get('fc') || urlParams.get('affiliate') || storage.get('fc') || storage.get('affiliate')
263
262
 
264
263
  storage.set('channel', channel, {
265
264
  path: '/',
@@ -273,7 +272,7 @@ export default function (request) {
273
272
  path: '/',
274
273
  maxAge: 60 * 60 * 24 * 7,
275
274
  })
276
- sessionStorage.set('fc', friendCode, {
275
+ storage.set('fc', friendCode, {
277
276
  path: '/',
278
277
  maxAge: 60 * 60 * 24 * 7,
279
278
  })
@@ -229,10 +229,6 @@ export default function (request) {
229
229
  ENTER_GAME_PAUSE: {
230
230
  actions: ['setIsPlaying', 'resetContent', 'resetSHA'],
231
231
  },
232
- ENTER_GAME: {
233
- target: 'connecting',
234
- actions: ['setGameInfo', 'setLang', 'setwalletType'],
235
- },
236
232
  },
237
233
  },
238
234
  playingDemo: {
@@ -247,9 +247,6 @@ export default function (request) {
247
247
  CLEAR: {
248
248
  actions: 'hideMessage',
249
249
  },
250
- SET_LANG: {
251
- actions: 'setLang',
252
- },
253
250
  },
254
251
  },
255
252
  {
@@ -279,10 +276,6 @@ export default function (request) {
279
276
  },
280
277
  },
281
278
  actions: {
282
- setLang: assign((context, event) => {
283
- const lang = event.data.locale || context.lang || 'en-US'
284
- return { lang }
285
- }),
286
279
  reset: assign((context, event) => {
287
280
  return {
288
281
  currentTab: null,
@@ -422,10 +415,9 @@ export default function (request) {
422
415
  return tabs
423
416
  },
424
417
  fetchMessages: async (context, event) => {
425
- const lang = context.lang
426
418
  const { isRewardListEnable, currentTab, inbox } = JSON.parse(JSON.stringify(context))
427
419
  if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND')) {
428
- const { data } = await request.send(activity.getRewardList({ count: 30, appSecret, lang }))
420
+ const { data } = await request.send(activity.getRewardList({ count: 30, appSecret }))
429
421
  inbox[currentTab] = { data, page: 0, totalPage: 1 }
430
422
  } else {
431
423
  const { page = -1 } = inbox[currentTab] || {}
@@ -10,7 +10,6 @@ import game_search_v2 from './game_search_v2.js'
10
10
  import game_hot_new from './game_hot_new.js'
11
11
  import game_info from './game_info.js'
12
12
  import game_replay from './game_replay.js'
13
- import game_betslip from './game_betslip.js'
14
13
  import inbox from './inbox.js'
15
14
  import merge from './merge.js'
16
15
  import payment_data from './payment_data.js'
@@ -54,7 +53,6 @@ export default {
54
53
  game_hot_new,
55
54
  game_info,
56
55
  game_replay,
57
- game_betslip,
58
56
  inbox,
59
57
  merge,
60
58
  payment_data,
@@ -2,7 +2,7 @@ import { createMachine, assign, send } from 'xstate'
2
2
  import activity from '../api/activity.js'
3
3
  import payment from '../api/payment.js'
4
4
 
5
- export default function (request, context) {
5
+ export default function (request) {
6
6
  const { appSecret } = request.config
7
7
  return createMachine(
8
8
  {
@@ -19,7 +19,6 @@ export default function (request, context) {
19
19
  isPlaying: false,
20
20
  callback: () => {},
21
21
  orderColumn: 'createTime',
22
- lang: context?.locale,
23
22
  },
24
23
  states: {
25
24
  timer: {
@@ -73,9 +72,6 @@ export default function (request, context) {
73
72
  SET_IS_PLAYING: {
74
73
  actions: 'setIsPlaying',
75
74
  },
76
- SET_LANG: {
77
- actions: 'setLang',
78
- },
79
75
  },
80
76
  },
81
77
  fetching: {
@@ -197,10 +193,6 @@ export default function (request, context) {
197
193
  isPlaying: event.data,
198
194
  }
199
195
  }),
200
- setLang: assign((context, event) => {
201
- const lang = event.data.locale || context.lang || 'en-US'
202
- return { lang }
203
- }),
204
196
  },
205
197
  guards: {
206
198
  isPrize: (context, event) => {
@@ -213,24 +205,22 @@ export default function (request, context) {
213
205
  },
214
206
  services: {
215
207
  fetchRewardList: async (context, event) => {
216
- const lang = context.lang
217
208
  const orderColumn = context.orderColumn
218
- const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret, lang }))
219
- const getPointsRewardAPI = request.send(activity.getRewardList({ rewardType: 'POINTS', count: 30, appSecret, lang }))
220
- const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE,PRIZE', count: 30, appSecret, orderColumn, lang }))
209
+ const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
210
+ const getPointsRewardAPI = request.send(activity.getRewardList({ rewardType: 'POINTS', count: 30, appSecret }))
211
+ const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE,PRIZE', count: 30, appSecret, orderColumn }))
221
212
  const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
222
213
  return [otherRewardList, pointsRewardList, rewardList]
223
214
  },
224
215
  fetchOtherRewardList: async (context, event) => {
225
216
  const orderColumn = context.orderColumn
226
- const lang = context.lang
217
+
227
218
  const getOtherRewardAPI = request.send(
228
219
  activity.getRewardList({
229
220
  rewardType: 'CASH,FREE,PRIZE',
230
221
  count: 30,
231
222
  appSecret,
232
223
  orderColumn,
233
- lang,
234
224
  })
235
225
  )
236
226
  const [otherRewardList] = await Promise.all([getOtherRewardAPI])
@@ -2,7 +2,7 @@ import { createMachine, assign, send } from 'xstate'
2
2
  import activity from '../api/activity.js'
3
3
  import payment from '../api/payment.js'
4
4
 
5
- export default function (request, context) {
5
+ export default function (request) {
6
6
  const { appSecret } = request.config
7
7
  return createMachine(
8
8
  {
@@ -18,7 +18,6 @@ export default function (request, context) {
18
18
  withdrawRule: {},
19
19
  callback: () => {},
20
20
  orderColumn: 'createTime',
21
- lang: context?.locale || 'en-US',
22
21
  },
23
22
  states: {
24
23
  timer: {
@@ -79,9 +78,6 @@ export default function (request, context) {
79
78
  target: 'allPointsReceiving',
80
79
  actions: 'setCallback',
81
80
  },
82
- SET_LANG: {
83
- actions: 'setLang',
84
- },
85
81
  },
86
82
  },
87
83
  fetching: {
@@ -205,22 +201,16 @@ export default function (request, context) {
205
201
  withdrawRule: event.data,
206
202
  }
207
203
  }),
208
- setLang: assign((context, event) => {
209
- const lang = event.data.locale || context.lang || 'en-US'
210
- return { lang }
211
- }),
212
204
  },
213
205
  services: {
214
206
  fetchRewardList: async (context, event) => {
215
- const lang = context.lang
216
- const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret, lang }))
207
+ const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
217
208
  const orderColumn = context.orderColumn
218
209
  const getPointsRewardAPI = request.send(
219
210
  activity.getRewardList({
220
211
  rewardType: 'POINTS',
221
212
  count: 30,
222
213
  appSecret,
223
- lang,
224
214
  })
225
215
  )
226
216
  const getOtherRewardAPI = request.send(
@@ -229,7 +219,6 @@ export default function (request, context) {
229
219
  count: 30,
230
220
  appSecret,
231
221
  orderColumn,
232
- lang,
233
222
  })
234
223
  )
235
224
  const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
@@ -244,7 +233,6 @@ export default function (request, context) {
244
233
  count: 30,
245
234
  appSecret,
246
235
  orderColumn,
247
- lang,
248
236
  })
249
237
  )
250
238
  const [otherRewardList] = await Promise.all([getOtherRewardAPI])
@@ -1,10 +1,22 @@
1
+ import withdraw_fc from './withdraw_fc.js'
2
+ import withdraw_vn from './withdraw_vn.js'
3
+ import withdraw_vn2 from './withdraw_vn2.js'
1
4
  import withdraw_manual from './withdraw_manual.js'
5
+ import withdraw_crypto from './withdraw_crypto.js'
6
+ import withdraw_crypto2 from './withdraw_crypto2.js'
7
+ import withdraw_amb from './withdraw_amb.js'
2
8
  import withdraw_krway from './withdraw_krway.js'
3
9
  import withdraw_crypto_cash from './withdraw_crypto_cash.js'
4
10
  import withdraw_manual_cash from './withdraw_manual_cash.js'
5
11
 
6
12
  export default {
13
+ withdraw_fc,
14
+ withdraw_vn,
15
+ withdraw_vn2,
7
16
  withdraw_manual,
17
+ withdraw_crypto,
18
+ withdraw_crypto2,
19
+ withdraw_amb,
8
20
  withdraw_krway,
9
21
  withdraw_crypto_cash,
10
22
  withdraw_manual_cash,