@jetthai/cuora 1.1.336-dev-9 → 1.1.336

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,14 +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.336-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.336-dev-8...v1.1.336-dev-9) (2025-02-03)
6
-
7
- ### [1.1.336-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.336-dev-7...v1.1.336-dev-8) (2025-02-03)
8
-
9
- ### [1.1.336-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.336-dev-6...v1.1.336-dev-7) (2025-01-24)
10
-
11
- ### [1.1.336-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.336...v1.1.336-dev-6) (2025-01-24)
12
-
13
5
  ### [1.1.336](https://github.com/jetthai/cuora-module/compare/v1.1.335...v1.1.336) (2025-01-14)
14
6
 
15
7
  ### [1.1.335](https://github.com/jetthai/cuora-module/compare/v1.1.334...v1.1.335) (2025-01-13)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.336-dev-9",
3
+ "version": "1.1.336",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
package/src/api/common.js CHANGED
@@ -6,5 +6,4 @@ export default {
6
6
  getAnnouncements: ({ appSecret }) => ({ url: 'getAnnouncements', params: { appSecret }, method: 'get', isPublic: true }),
7
7
  getNavbar: ({ appSecret } = {}) => ({ url: 'getNavbarSetting', params: { appSecret }, method: 'get', isPublic: true }),
8
8
  getDefaultAffiliateCode: ({ appSecret }) => ({ url: 'getAffiliateCode', params: { appSecret }, method: 'get', isPublic: true }),
9
- getSiteInfoConfig: ({ appSecret, config }) => ({ url: 'get-site-config', method: 'get', params: { appSecret, config }, isPublic: true }),
10
9
  }
package/src/api/game.js CHANGED
@@ -98,6 +98,4 @@ export default {
98
98
  params: { providerId, seqNo, lang },
99
99
  isPublic: true,
100
100
  }),
101
- getFreeGameList: () => ({ method: 'get', url: 'activities/getFreeGameRewardList' }),
102
- getFreeGameReward: ({ activityNo, receiveNo }) => ({ method: 'post', url: 'activities/getFreeGameReward', params: { activityNo, receiveNo } }),
103
101
  }
@@ -222,10 +222,10 @@ export default {
222
222
  params: { transferType: 'WITHDRAW', amount },
223
223
  }),
224
224
  getPromotionsList: () => ({ url: `payment/v2/bankWallet/promotions`, method: 'get' }),
225
- getWithdrawRulePreview: ({ applyType, applyNo, amount, isFreeGame }) => ({
225
+ getWithdrawRulePreview: ({ applyType, applyNo, amount }) => ({
226
226
  url: `payment/v2/bankWallet/promotion/preview`,
227
227
  method: 'post',
228
- params: { applyType, applyNo, amount, isFreeGame },
228
+ params: { applyType, applyNo, amount },
229
229
  }),
230
230
  applyPromotions: ({ promotionsNo, amount }) => ({
231
231
  url: `payment/v2/bankWallet/promotion/apply`,
@@ -128,7 +128,6 @@ export default function (request) {
128
128
  idle: {
129
129
  on: {
130
130
  FETCH_ANNOUNCEMENTS: {
131
- actions: 'clearAnnouncements',
132
131
  target: 'updating',
133
132
  },
134
133
  },
@@ -277,9 +276,6 @@ export default function (request) {
277
276
  }
278
277
  }
279
278
  }),
280
- clearAnnouncements: assign((context, event) => {
281
- return { announcementList: null }
282
- }),
283
279
  setAnnouncements: assign((context, event) => {
284
280
  const { data } = event.data
285
281
  return { announcementList: { data } }
@@ -26,16 +26,12 @@ export default function () {
26
26
  { target: 'logout', cond: 'isLogout' },
27
27
  { target: 'deposit', cond: 'isNoBalance' },
28
28
  { target: 'unfinishedGame', cond: 'isUnfinishedGame', actions: 'setUnfinishedGame' },
29
- { target: 'freeGameSettle', cond: 'isFreeGameSettle' },
30
- { target: 'freeGameGiveUp', cond: 'isFreeGameGiveUp' },
31
29
  // { target: 'hall' },
32
30
  ],
33
31
  },
34
32
  logout: {},
35
33
  deposit: {},
36
34
  unfinishedGame: {},
37
- freeGameSettle: {},
38
- freeGameGiveUp: {},
39
35
  // hall: {},
40
36
  },
41
37
  },
@@ -69,12 +65,6 @@ export default function () {
69
65
  isUnfinishedGame: (context, event) => {
70
66
  return context.error.extend?.includes?.('unfinished_')
71
67
  },
72
- isFreeGameSettle: (context, event) => {
73
- return context.error.code === 'ERR_G124'
74
- },
75
- isFreeGameGiveUp: (context, event) => {
76
- return context.error.code === 'ERR_G125'
77
- },
78
68
  },
79
69
  services: {},
80
70
  }
@@ -30,7 +30,6 @@ export default function (request) {
30
30
  withdrawRules: [],
31
31
  withdrawRule: {},
32
32
  withdrawCheck: {},
33
- freeGameDetail: [],
34
33
  amount: null,
35
34
  calculation: null,
36
35
 
@@ -135,11 +134,11 @@ export default function (request) {
135
134
  invoke: {
136
135
  src: 'convertFreeCredit',
137
136
  onDone: [
138
- // {
139
- // target: '#withdraw_manual.otp',
140
- // actions: 'setOtp',
141
- // cond: 'isOtpRequired',
142
- // },
137
+ {
138
+ target: '#withdraw_manual.otp',
139
+ actions: 'setOtp',
140
+ cond: 'isOtpRequired',
141
+ },
143
142
  { target: 'converted' },
144
143
  ],
145
144
  onError: {
@@ -148,10 +147,10 @@ export default function (request) {
148
147
  },
149
148
  },
150
149
  converted: {
151
- // always: [
152
- // { target: '#withdraw_manual.cash.unbound', cond: 'isBankNotBound' },
153
- // { target: '#withdraw_manual.cash.withdrawable', cond: 'hasAttachmentType' },
154
- // ],
150
+ always: [
151
+ { target: '#withdraw_manual.cash.unbound', cond: 'isBankNotBound' },
152
+ { target: '#withdraw_manual.cash.withdrawable', cond: 'hasAttachmentType' },
153
+ ],
155
154
  },
156
155
  },
157
156
  },
@@ -408,7 +407,7 @@ export default function (request) {
408
407
  }
409
408
  }),
410
409
  updateWithdrawCondition: assign((context, event) => {
411
- const { enableWithdraw, enableWithdrawAmount, currentWithdrawLimit, targetWithdrawLimit, balance, freeGameDetail } = event.data
410
+ const { enableWithdraw, enableWithdrawAmount, currentWithdrawLimit, targetWithdrawLimit, balance } = event.data
412
411
  const withdrawRules = event.data?.rules || []
413
412
  const rules = withdrawRules.filter((rule) => rule.maxWithdrawAmount > 0)
414
413
  const lastMatchedIndex = findLastIndex(rules, (rule) => balance >= rule.greaterEqualThen)
@@ -432,7 +431,6 @@ export default function (request) {
432
431
  enableWithdrawAmount: +enableWithdrawAmount,
433
432
  enableWithdraw,
434
433
  withdrawRules,
435
- freeGameDetail,
436
434
  }
437
435
  }),
438
436
  setWithdrawRulePreview: assign((context, event) => {
@@ -509,13 +507,8 @@ export default function (request) {
509
507
  return !context.boundBanks?.length
510
508
  },
511
509
  isConvertible: (context, event) => {
512
- const { enableWithdraw, freeGameDetail } = context
513
- const isFreeGame = freeGameDetail?.length > 0
514
- if (isFreeGame) {
515
- return freeGameDetail[0]?.freeGameCount === freeGameDetail[0]?.freeGameUsedCount
516
- } else {
517
- return enableWithdraw
518
- }
510
+ const { enableWithdraw } = context
511
+ return enableWithdraw
519
512
  },
520
513
  isNotWithdrawable: (context, event) => {
521
514
  const { balance, enableWithdraw, paymentDetail } = context
@@ -107,11 +107,11 @@ export default function (request) {
107
107
  invoke: {
108
108
  src: 'convertFreeCredit',
109
109
  onDone: [
110
- // {
111
- // target: '#withdraw_vn.otp',
112
- // actions: 'setOtp',
113
- // cond: 'isOtpRequired',
114
- // },
110
+ {
111
+ target: '#withdraw_vn.otp',
112
+ actions: 'setOtp',
113
+ cond: 'isOtpRequired',
114
+ },
115
115
  { target: 'converted' },
116
116
  ],
117
117
  onError: {
@@ -120,10 +120,10 @@ export default function (request) {
120
120
  },
121
121
  },
122
122
  converted: {
123
- // always: [
124
- // { target: '#withdraw_vn.cash.unbound', cond: 'isBankNotBound' },
125
- // { target: '#withdraw_vn.cash.withdrawable', cond: 'hasAttachmentType' },
126
- // ],
123
+ always: [
124
+ { target: '#withdraw_vn.cash.unbound', cond: 'isBankNotBound' },
125
+ { target: '#withdraw_vn.cash.withdrawable', cond: 'hasAttachmentType' },
126
+ ],
127
127
  },
128
128
  },
129
129
  },