@jetthai/cuora 1.1.368-dev-3 → 1.1.368-dev-5

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,6 +2,18 @@
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.368-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.371...v1.1.368-dev-5) (2025-08-12)
6
+
7
+ ### [1.1.368-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.369...v1.1.368-dev-4) (2025-08-06)
8
+
9
+ ### [1.1.368-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.368-dev-2...v1.1.368-dev-3) (2025-08-04)
10
+
11
+ ### [1.1.368-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.368-dev-1...v1.1.368-dev-2) (2025-08-04)
12
+
13
+ ### [1.1.368-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.368...v1.1.368-dev-1) (2025-08-01)
14
+
15
+ ### [1.1.368-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.368-dev-3...v1.1.368-dev-4) (2025-08-06)
16
+
5
17
  ### [1.1.368-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.368-dev-2...v1.1.368-dev-3) (2025-08-04)
6
18
 
7
19
  ### [1.1.368-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.368-dev-1...v1.1.368-dev-2) (2025-08-04)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.368-dev-3",
3
+ "version": "1.1.368-dev-5",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -294,14 +294,13 @@ export default function (request) {
294
294
  return { announcementList: { data } }
295
295
  }),
296
296
  setFeeds: assign((context, event) => {
297
- const { announcementList, broadcastList, mailBoxInfo } = event.data
297
+ const { broadcastList, mailBoxInfo } = event.data
298
298
  const { siteConfig } = context
299
- const promotions = announcementList?.announcements?.filter?.((item) => item.category === 3) || []
300
299
  const customerMessageEnable = siteConfig?.csChat?.some((item) => item.enable && item.name === 'customermessage')
301
300
  if (!customerMessageEnable) {
302
301
  mailBoxInfo.rows -= mailBoxInfo.detailRows?.CUSTOMER || 0
303
302
  }
304
- return { broadcastList, mailBoxInfo, promotions }
303
+ return { broadcastList, mailBoxInfo }
305
304
  }),
306
305
  setBroadcast: assign((context, event) => {
307
306
  const { broadcastList, sentNormalBroadcastList, normalBroadcast } = context
@@ -233,7 +233,7 @@ export default function (request) {
233
233
  return await request.send(
234
234
  payment.getDepositExpectedResult({
235
235
  method: currentCrypto.method,
236
- amount: currentAmount,
236
+ amount: Number(currentAmount),
237
237
  cryptoCurrency: currentCrypto.channel,
238
238
  })
239
239
  )
@@ -280,7 +280,7 @@ export default function (request) {
280
280
  return await request.send(
281
281
  payment.getDepositExpectedResult({
282
282
  method: currentMethod,
283
- amount,
283
+ amount: Number(amount),
284
284
  promotionsNo: promotion?.activityNo,
285
285
  })
286
286
  )
@@ -195,7 +195,7 @@ export default function (request, context) {
195
195
  return await request.send(
196
196
  payment.getDepositExpectedResult({
197
197
  method: selectedDirect.method,
198
- amount: selectedAmount,
198
+ amount: Number(selectedAmount),
199
199
  promotionsNo: promotion?.promotionsNo,
200
200
  })
201
201
  )
@@ -355,7 +355,7 @@ export default function (request) {
355
355
  return await request.send(
356
356
  payment.getDepositExpectedResult({
357
357
  method,
358
- amount,
358
+ amount: Number(amount),
359
359
  promotionsNo: promotion?.activityNo,
360
360
  })
361
361
  )
@@ -183,7 +183,7 @@ export default function (request, context) {
183
183
  return await request.send(
184
184
  payment.getDepositExpectedResult({
185
185
  method: selectedLoadcard.method,
186
- amount: selectedAmount,
186
+ amount: Number(selectedAmount),
187
187
  promotionsNo: promotion?.promotionsNo,
188
188
  })
189
189
  )
@@ -319,7 +319,7 @@ export default function (request) {
319
319
  return await request.send(
320
320
  payment.getDepositExpectedResult({
321
321
  method: currentMethod,
322
- amount: selectedAmount,
322
+ amount: Number(selectedAmount),
323
323
  promotionsNo: promotion?.activityNo,
324
324
  })
325
325
  )
@@ -308,7 +308,7 @@ export default function (request, context) {
308
308
  return await request.send(
309
309
  payment.getDepositExpectedResult({
310
310
  method,
311
- amount: selectedAmount,
311
+ amount: Number(selectedAmount),
312
312
  promotionsNo: promotion?.promotionsNo,
313
313
  })
314
314
  )
@@ -402,7 +402,7 @@ export default function (request) {
402
402
  return await request.send(
403
403
  payment.getDepositExpectedResult({
404
404
  method,
405
- amount,
405
+ amount: Number(amount),
406
406
  promotionsNo: promotion?.activityNo,
407
407
  })
408
408
  )
@@ -196,7 +196,7 @@ export default function (request, context) {
196
196
  return await request.send(
197
197
  payment.getDepositExpectedResult({
198
198
  method: selectedQrcode.method,
199
- amount: selectedAmount,
199
+ amount: Number(selectedAmount),
200
200
  promotionsNo: promotion?.promotionsNo,
201
201
  })
202
202
  )
@@ -309,7 +309,7 @@ export default function (request) {
309
309
  return await request.send(
310
310
  payment.getDepositExpectedResult({
311
311
  method: currentMethod,
312
- amount: selectedAmount,
312
+ amount: Number(selectedAmount),
313
313
  promotionsNo: promotion?.activityNo,
314
314
  })
315
315
  )
@@ -179,7 +179,7 @@ export default function (request, context) {
179
179
  return await request.send(
180
180
  payment.getDepositExpectedResult({
181
181
  method,
182
- amount: selectedAmount,
182
+ amount: Number(selectedAmount),
183
183
  promotionsNo: promotion?.promotionsNo,
184
184
  })
185
185
  )
@@ -239,7 +239,7 @@ export default function (request) {
239
239
  return await request.send(
240
240
  payment.getDepositExpectedResult({
241
241
  method,
242
- amount,
242
+ amount: Number(amount),
243
243
  promotionsNo: promotion?.activityNo,
244
244
  })
245
245
  )
@@ -348,7 +348,7 @@ export default function (request) {
348
348
  return await request.send(
349
349
  payment.getDepositExpectedResult({
350
350
  method,
351
- amount,
351
+ amount: Number(amount),
352
352
  promotionsNo: promotion?.activityNo,
353
353
  })
354
354
  )
@@ -613,7 +613,9 @@ export default function (request) {
613
613
  is_mobile: isMobile === 'mobile' ? 'y' : null,
614
614
  lang,
615
615
  selected_wallet_type: walletType,
616
- return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
616
+ return_url: returnProviders.includes(providerId)
617
+ ? `${window.location.origin}${context.base}return`
618
+ : window.location.href?.split('?')?.[0], // For providers to return.
617
619
  }
618
620
  const { type, redirect_url, gameToken, gameHtml, wallet_type } = await request.send(api.playGame(params))
619
621
  return { type, gameToken, gameHtml, gameURL: redirect_url, gameWalletType: wallet_type }
@@ -292,7 +292,6 @@ export default function (request) {
292
292
  }
293
293
  }),
294
294
  resetPage: assign((context, event) => {
295
- console.log('updateMessage resetPage')
296
295
  const { inbox, currentTab } = JSON.parse(JSON.stringify(context))
297
296
  inbox[currentTab].page = -1
298
297
  return {
@@ -437,14 +436,18 @@ export default function (request) {
437
436
  return inbox
438
437
  },
439
438
  reFetchMessages: async (context, event) => {
440
- const { currentTab, inbox } = JSON.parse(JSON.stringify(context))
441
-
442
- if (currentTab === 'FREE_GAME') return inbox
439
+ const lang = context.lang
440
+ const { isRewardListEnable, currentTab, inbox } = JSON.parse(JSON.stringify(context))
443
441
 
444
- const { data, ...rest } = await request.send(mailbox.getMessageList({ type: currentTab, page: 0 }))
445
- let formattedData = []
446
- formattedData = data?.map((item) => ({ ...item, isSelected: false }))
447
- inbox[currentTab] = { data: formattedData, ...rest }
442
+ if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND' || currentTab === 'FREE_GAME')) {
443
+ const { data } = await request.send(activity.getRewardList({ count: 30, appSecret, lang }))
444
+ inbox[currentTab] = { data, page: 0, totalPage: 1 }
445
+ } else {
446
+ const { data, ...rest } = await request.send(mailbox.getMessageList({ type: currentTab, page: 0 }))
447
+ let formattedData = []
448
+ formattedData = data?.map((item) => ({ ...item, isSelected: false }))
449
+ inbox[currentTab] = { data: formattedData, ...rest }
450
+ }
448
451
  return inbox
449
452
  },
450
453
  updateMessageIsRead: async (context, event) => {