@jetthai/cuora 1.1.359-dev-7 → 1.1.360

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,21 +2,7 @@
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.359-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.359-dev-6...v1.1.359-dev-7) (2025-06-04)
6
-
7
- ### [1.1.395-payment-1](https://github.com/jetthai/cuora-module/compare/v1.1.359-dev-4...v1.1.395-payment-1) (2025-05-27)
8
-
9
- ### [1.1.359-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.359-dev-5...v1.1.359-dev-6) (2025-06-02)
10
-
11
- ### [1.1.359-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.359-dev-4...v1.1.359-dev-5) (2025-06-02)
12
-
13
- ### [1.1.359-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.359-dev-3...v1.1.359-dev-4) (2025-05-26)
14
-
15
- ### [1.1.359-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.359-dev-2...v1.1.359-dev-3) (2025-05-26)
16
-
17
- ### [1.1.359-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.359-dev-1...v1.1.359-dev-2) (2025-05-26)
18
-
19
- ### [1.1.359-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.359...v1.1.359-dev-1) (2025-05-24)
5
+ ### [1.1.360](https://github.com/jetthai/cuora-module/compare/v1.1.359...v1.1.360) (2025-06-03)
20
6
 
21
7
  ### [1.1.359](https://github.com/jetthai/cuora-module/compare/v1.1.358...v1.1.359) (2025-05-23)
22
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.359-dev-7",
3
+ "version": "1.1.360",
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, orderColumn }) => ({
72
+ getRewardList: ({ rewardType, count, appSecret }) => ({
73
73
  url: 'activities/rewards',
74
74
  method: 'get',
75
- params: { rewardType, count, appSecret, orderColumn },
75
+ params: { rewardType, count, appSecret },
76
76
  }),
77
77
  getCashRainReward: ({ activityNo, appSecret }) => ({
78
78
  url: `activities/cashRain`,
package/src/api/game.js CHANGED
@@ -7,7 +7,7 @@ export default {
7
7
  demoGame: (params) => ({ url: 'game/demo', method: 'get', params, isPublic: true }),
8
8
  logoutGame: ({ uid_site, provider_id }) => ({ url: 'game/logout', method: 'get', params: { uid_site, provider_id } }),
9
9
 
10
- getGameTags: ({ q, lang, limit = 20 }) => ({ url: 'game/search', method: 'get', params: { q, lang, limit } }),
10
+ getGameTags: ({ q, lang }) => ({ url: 'game/search', method: 'get', params: { q, lang } }),
11
11
  getGameSearchHome: () => ({ url: 'game/search/home', method: 'get' }),
12
12
  getGameSearchList: ({ id, index, q, click, clickDefault, providerName }) => ({
13
13
  url: 'game/search/list',
@@ -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
  })
@@ -83,7 +83,7 @@ export default function (request) {
83
83
  },
84
84
  ENTER_GAME: {
85
85
  target: 'connecting',
86
- actions: ['setGameInfo', 'setLang', 'setwalletType'],
86
+ actions: ['setGameInfo', 'setLang', 'setWalletType'],
87
87
  },
88
88
  DEMO_GAME: {
89
89
  target: 'demoGame',
@@ -91,7 +91,7 @@ export default function (request) {
91
91
  },
92
92
  MENU_ENTER_GAME: {
93
93
  target: 'connecting',
94
- actions: ['setGameInfo', 'setLang', 'setwalletType'],
94
+ actions: ['setGameInfo', 'setLang', 'setWalletType'],
95
95
  },
96
96
  UPDATE: {
97
97
  target: 'updating',
@@ -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: {
@@ -245,7 +241,7 @@ export default function (request) {
245
241
  },
246
242
  ENTER_GAME: {
247
243
  target: 'connecting',
248
- actions: ['setGameInfo', 'setLang', 'setwalletType'],
244
+ actions: ['setGameInfo', 'setLang', 'setWalletType'],
249
245
  },
250
246
  },
251
247
  },
@@ -459,7 +455,7 @@ export default function (request) {
459
455
  const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
460
456
  return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
461
457
  }),
462
- setwalletType: assign((context, event) => {
458
+ setWalletType: assign((context, event) => {
463
459
  return { walletType: event.data.walletType }
464
460
  }),
465
461
  setLang: assign((context, event) => {
@@ -18,7 +18,6 @@ export default function (request) {
18
18
  rewardType: null,
19
19
  isPlaying: false,
20
20
  callback: () => {},
21
- orderColumn: 'createTime',
22
21
  },
23
22
  states: {
24
23
  timer: {
@@ -57,10 +56,6 @@ export default function (request) {
57
56
  target: 'fetching',
58
57
  actions: 'setRewardData',
59
58
  },
60
- FETCH_OTHER_REWARD: {
61
- target: 'fetchingOtherReward',
62
- actions: 'setOrderColumn',
63
- },
64
59
  RECEIVE_REWARD: {
65
60
  target: 'receiving',
66
61
  actions: ['setCallback', 'setRewardType'],
@@ -86,18 +81,6 @@ export default function (request) {
86
81
  },
87
82
  },
88
83
  },
89
- fetchingOtherReward: {
90
- invoke: {
91
- src: 'fetchOtherRewardList',
92
- onDone: {
93
- target: 'idle',
94
- actions: 'setOtherRewardList',
95
- },
96
- onError: {
97
- target: 'idle',
98
- },
99
- },
100
- },
101
84
  pending: {
102
85
  on: {
103
86
  RECEIVE_REWARD: {
@@ -153,11 +136,6 @@ export default function (request) {
153
136
  rewardList: event.data[2]?.data || [],
154
137
  }
155
138
  }),
156
- setOtherRewardList: assign((context, event) => {
157
- return {
158
- otherRewardList: event.data[0]?.data,
159
- }
160
- }),
161
139
  setRewardData: assign((context, event) => {
162
140
  const { activityNo, receiveNo } = event.data
163
141
  return {
@@ -170,11 +148,6 @@ export default function (request) {
170
148
  callback: event.data?.callback || (() => {}),
171
149
  }
172
150
  }),
173
- setOrderColumn: assign((context, event) => {
174
- return {
175
- orderColumn: event.data?.orderColumn || 'createTime',
176
- }
177
- }),
178
151
  setRewardType: assign((context, event) => {
179
152
  return {
180
153
  rewardType: event.data?.rewardType,
@@ -205,27 +178,12 @@ export default function (request) {
205
178
  },
206
179
  services: {
207
180
  fetchRewardList: async (context, event) => {
208
- const orderColumn = context.orderColumn
209
181
  const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
210
182
  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 }))
183
+ const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE,PRIZE', count: 30, appSecret }))
212
184
  const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
213
185
  return [otherRewardList, pointsRewardList, rewardList]
214
186
  },
215
- fetchOtherRewardList: async (context, event) => {
216
- const orderColumn = context.orderColumn
217
-
218
- const getOtherRewardAPI = request.send(
219
- activity.getRewardList({
220
- rewardType: 'CASH,FREE,PRIZE',
221
- count: 30,
222
- appSecret,
223
- orderColumn,
224
- })
225
- )
226
- const [otherRewardList] = await Promise.all([getOtherRewardAPI])
227
- return [otherRewardList]
228
- },
229
187
  fetchWithdrawRulePreview: async (context, event) => {
230
188
  const { receiveNo } = context
231
189
  const data = await request.send(payment.getWithdrawRulePreview({ applyType: 'activity', applyNo: receiveNo, amount: null }))
@@ -17,7 +17,6 @@ export default function (request) {
17
17
  receiveNo: null,
18
18
  withdrawRule: {},
19
19
  callback: () => {},
20
- orderColumn: 'createTime',
21
20
  },
22
21
  states: {
23
22
  timer: {
@@ -66,10 +65,6 @@ export default function (request) {
66
65
  target: 'fetching',
67
66
  actions: 'setRewardData',
68
67
  },
69
- FETCH_OTHER_REWARD: {
70
- target: 'fetchingOtherReward',
71
- actions: 'setOrderColumn',
72
- },
73
68
  RECEIVE_REWARD: {
74
69
  target: 'receiving',
75
70
  actions: 'setCallback',
@@ -92,18 +87,6 @@ export default function (request) {
92
87
  },
93
88
  },
94
89
  },
95
- fetchingOtherReward: {
96
- invoke: {
97
- src: 'fetchOtherRewardList',
98
- onDone: {
99
- target: 'idle',
100
- actions: 'setOtherRewardList',
101
- },
102
- onError: {
103
- target: 'idle',
104
- },
105
- },
106
- },
107
90
  pending: {
108
91
  on: {
109
92
  RECEIVE_REWARD: {
@@ -171,11 +154,6 @@ export default function (request) {
171
154
  rewardList: event.data[2]?.data || [],
172
155
  }
173
156
  }),
174
- setOtherRewardList: assign((context, event) => {
175
- return {
176
- otherRewardList: event.data[0]?.data,
177
- }
178
- }),
179
157
  setRewardData: assign((context, event) => {
180
158
  const { activityNo, receiveNo } = event.data
181
159
  return {
@@ -188,11 +166,6 @@ export default function (request) {
188
166
  callback: event.data?.callback || (() => {}),
189
167
  }
190
168
  }),
191
- setOrderColumn: assign((context, event) => {
192
- return {
193
- orderColumn: event.data?.orderColumn || 'createTime',
194
- }
195
- }),
196
169
  doCallback: (context, event) => {
197
170
  context.callback()
198
171
  },
@@ -205,7 +178,6 @@ export default function (request) {
205
178
  services: {
206
179
  fetchRewardList: async (context, event) => {
207
180
  const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
208
- const orderColumn = context.orderColumn
209
181
  const getPointsRewardAPI = request.send(
210
182
  activity.getRewardList({
211
183
  rewardType: 'POINTS',
@@ -218,26 +190,11 @@ export default function (request) {
218
190
  rewardType: 'CASH,FREE,PRIZE',
219
191
  count: 30,
220
192
  appSecret,
221
- orderColumn,
222
193
  })
223
194
  )
224
195
  const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
225
196
  return [otherRewardList, pointsRewardList, rewardList]
226
197
  },
227
- fetchOtherRewardList: async (context, event) => {
228
- const orderColumn = context.orderColumn
229
-
230
- const getOtherRewardAPI = request.send(
231
- activity.getRewardList({
232
- rewardType: 'CASH,FREE,PRIZE',
233
- count: 30,
234
- appSecret,
235
- orderColumn,
236
- })
237
- )
238
- const [otherRewardList] = await Promise.all([getOtherRewardAPI])
239
- return [otherRewardList]
240
- },
241
198
  fetchWithdrawRulePreview: async (context, event) => {
242
199
  const { receiveNo } = context
243
200
  const data = await request.send(
@@ -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,