@jetthai/cuora 1.1.346-dev-5 → 1.1.346-dev-7

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,24 @@
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.346-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.346-wallet-1...v1.1.346-dev-7) (2025-04-11)
6
+
7
+ ### [1.1.346-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.346-dev-5...v1.1.346-dev-6) (2025-04-08)
8
+
9
+ ### [1.1.346-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.346-dev-4...v1.1.346-dev-5) (2025-04-08)
10
+
11
+ ### [1.1.346-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.346-dev-4) (2025-04-02)
12
+
13
+ ### [1.1.346-ranking-1](https://github.com/jetthai/cuora-module/compare/v1.1.351...v1.1.346-ranking-1) (2025-04-02)
14
+
15
+ ### [1.1.346-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.347...v1.1.346-dev-3) (2025-03-30)
16
+
17
+ ### [1.1.346-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.346-dev-1...v1.1.346-dev-2) (2025-03-28)
18
+
19
+ ### [1.1.346-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.346...v1.1.346-dev-1) (2025-03-28)
20
+
21
+ ### [1.1.346-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.346-dev-5...v1.1.346-dev-6) (2025-04-08)
22
+
5
23
  ### [1.1.346-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.346-dev-4...v1.1.346-dev-5) (2025-04-08)
6
24
 
7
25
  ### [1.1.353](https://github.com/jetthai/cuora-module/compare/v1.1.352...v1.1.353) (2025-04-02)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.346-dev-5",
3
+ "version": "1.1.346-dev-7",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -182,8 +182,7 @@ export default function (request) {
182
182
  services: {
183
183
  fetchList: async (context, event) => {
184
184
  const hasToken = request.getToken()
185
- const isDoubleWallet = context.siteConfig?.walletMode === '4'
186
- const apiCallable = hasToken && isDoubleWallet
185
+ const apiCallable = hasToken
187
186
  const [{ data }, promotionList] = await Promise.all([
188
187
  hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
189
188
  apiCallable && !context.isPlaying ? request.send(payment.getPromotionsList()) : [],
@@ -58,7 +58,6 @@ export default function (request) {
58
58
  always: [
59
59
  {
60
60
  target: 'loaded',
61
- cond: 'isDoubleWalletMode',
62
61
  },
63
62
  {
64
63
  target: 'calculating',
@@ -91,7 +90,7 @@ export default function (request) {
91
90
  SUBMIT: [
92
91
  {
93
92
  target: 'pending',
94
- cond: (context, event) => context.siteConfig?.walletMode === '4' && !!context.calculation,
93
+ cond: (context, event) => !!context.calculation,
95
94
  },
96
95
  {
97
96
  target: 'submitting',
@@ -129,7 +128,7 @@ export default function (request) {
129
128
  SUBMIT: [
130
129
  {
131
130
  target: 'pending',
132
- cond: (context, event) => context.siteConfig?.walletMode === '4' && !!context.calculation,
131
+ cond: (context, event) => !!context.calculation,
133
132
  },
134
133
  {
135
134
  target: 'submitting',
@@ -247,9 +246,6 @@ export default function (request) {
247
246
  }),
248
247
  },
249
248
  guards: {
250
- isDoubleWalletMode: (context, event) => {
251
- return context.siteConfig?.walletMode === '4'
252
- },
253
249
  isCalculable: (context, event) => {
254
250
  const {
255
251
  amount,
@@ -72,8 +72,8 @@ export default function (request) {
72
72
  target: 'fetching',
73
73
  cond: (context, event) => {
74
74
  const { siteConfig = {}, promotion = {} } = context
75
- const { walletMode = '', bonusPreviewEnable } = siteConfig
76
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
75
+ const { bonusPreviewEnable } = siteConfig
76
+ return bonusPreviewEnable && promotion.activityNo != 'none'
77
77
  },
78
78
  },
79
79
  { target: 'loaded' },
@@ -49,8 +49,8 @@ export default function (request) {
49
49
  target: 'fetching',
50
50
  cond: (context, event) => {
51
51
  const { siteConfig = {}, promotion = {}, selectedCard } = context
52
- const { walletMode = '', bonusPreviewEnable } = siteConfig
53
- return !!selectedCard && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
52
+ const { bonusPreviewEnable } = siteConfig
53
+ return !!selectedCard && bonusPreviewEnable && promotion.activityNo != 'none'
54
54
  },
55
55
  },
56
56
  { target: 'loaded' },
@@ -78,8 +78,8 @@ export default function (request) {
78
78
  actions: 'setCard',
79
79
  cond: (context, event) => {
80
80
  const { siteConfig = {}, promotion = {} } = context
81
- const { walletMode = '', bonusPreviewEnable } = siteConfig
82
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
81
+ const { bonusPreviewEnable } = siteConfig
82
+ return bonusPreviewEnable && promotion.activityNo != 'none'
83
83
  },
84
84
  },
85
85
  {
@@ -87,11 +87,6 @@ export default function (request) {
87
87
  },
88
88
  ],
89
89
  SELECT_AMOUNT: [
90
- {
91
- target: 'pending',
92
- actions: 'setAmount',
93
- cond: 'isFreeWalletMode',
94
- },
95
90
  {
96
91
  target: 'debouncing',
97
92
  actions: 'setAmount',
@@ -99,19 +94,6 @@ export default function (request) {
99
94
  ],
100
95
  },
101
96
  },
102
- pending: {
103
- on: {
104
- SELECT_AMOUNT: {
105
- actions: 'setAmount',
106
- },
107
- CONFIRM: {
108
- target: 'debouncing',
109
- },
110
- BACK: {
111
- target: 'loaded',
112
- },
113
- },
114
- },
115
97
  debouncing: {
116
98
  on: {
117
99
  SELECT_AMOUNT: {
@@ -132,19 +114,6 @@ export default function (request) {
132
114
  invoke: {
133
115
  src: 'fetchCalculation',
134
116
  onDone: [
135
- {
136
- target: 'submitting',
137
- actions: 'setCalculation',
138
- cond: (context, event) => {
139
- const { siteConfig = {}, selectedCard = {} } = context
140
- return siteConfig.walletMode === '2' && selectedCard.jumpLinkEnable === 1
141
- },
142
- },
143
- {
144
- target: 'cardInfo',
145
- actions: 'setCalculation',
146
- cond: 'isFreeWalletMode',
147
- },
148
117
  {
149
118
  target: 'calculated',
150
119
  actions: 'setCalculation',
@@ -158,17 +127,10 @@ export default function (request) {
158
127
  calculable: {
159
128
  entry: 'clearCalculation',
160
129
  on: {
161
- SELECT_AMOUNT: [
162
- {
163
- target: 'pending',
164
- actions: 'setAmount',
165
- cond: 'isFreeWalletMode',
166
- },
167
- {
168
- target: 'debouncing',
169
- actions: 'setAmount',
170
- },
171
- ],
130
+ SELECT_AMOUNT: {
131
+ target: 'debouncing',
132
+ actions: 'setAmount',
133
+ },
172
134
  BACK: {
173
135
  target: 'loaded',
174
136
  },
@@ -216,8 +178,8 @@ export default function (request) {
216
178
  actions: 'setCard',
217
179
  cond: (context, event) => {
218
180
  const { siteConfig = {}, promotion = {} } = context
219
- const { walletMode = '', bonusPreviewEnable } = siteConfig
220
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
181
+ const { bonusPreviewEnable } = siteConfig
182
+ return bonusPreviewEnable && promotion.activityNo != 'none'
221
183
  },
222
184
  },
223
185
  {
@@ -325,9 +287,6 @@ export default function (request) {
325
287
  }),
326
288
  },
327
289
  guards: {
328
- isFreeWalletMode: (context, event) => {
329
- return context.siteConfig?.walletMode === '2'
330
- },
331
290
  isSubmittable: (context, event) => {
332
291
  const { cardNumber, serialNumber } = context
333
292
  return cardNumber && serialNumber
@@ -75,24 +75,8 @@ export default function (request) {
75
75
  },
76
76
  },
77
77
  step1: {
78
- initial: 'promotion',
78
+ initial: 'idle',
79
79
  states: {
80
- promotion: {
81
- always: [
82
- {
83
- target: 'idle',
84
- cond: 'isDoubleWalletMode',
85
- },
86
- {
87
- target: 'calculating',
88
- actions: 'setPromotionDefaultAmount',
89
- cond: 'hasMinPromotionDeposit',
90
- },
91
- {
92
- target: 'idle',
93
- },
94
- ],
95
- },
96
80
  idle: {},
97
81
  calculating: {
98
82
  invoke: {
@@ -137,11 +121,10 @@ export default function (request) {
137
121
  {
138
122
  target: 'pending',
139
123
  cond: (context, event) => {
140
- const { siteConfig = {}, calculation, promotion } = context
141
- const { walletMode } = siteConfig
124
+ const { calculation, promotion } = context
142
125
  const { promotionsNo, activityNo } = promotion
143
126
  const isNoBonus = promotionsNo === 'none' || activityNo === 'none'
144
- return walletMode === '4' && !!calculation && !isNoBonus
127
+ return !!calculation && !isNoBonus
145
128
  },
146
129
  },
147
130
  {
@@ -385,9 +368,6 @@ export default function (request) {
385
368
  }),
386
369
  },
387
370
  guards: {
388
- isDoubleWalletMode: (context, event) => {
389
- return context.siteConfig?.walletMode === '4'
390
- },
391
371
  isCalculable: (context, event) => {
392
372
  const {
393
373
  amount,
@@ -49,16 +49,8 @@ export default function (request) {
49
49
  target: 'fetching',
50
50
  cond: (context, event) => {
51
51
  const { siteConfig = {}, promotion = {}, selectedQrcode } = context
52
- const { walletMode = '', bonusPreviewEnable } = siteConfig
53
- return !!selectedQrcode && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
54
- },
55
- },
56
- {
57
- target: 'debouncing',
58
- actions: 'setPromotionDefaultAmount',
59
- cond: (context, event) => {
60
- const { siteConfig = {}, promotion = {} } = context
61
- return siteConfig.walletMode === '3' && !!promotion?.minimumAmount
52
+ const { bonusPreviewEnable } = siteConfig
53
+ return !!selectedQrcode && bonusPreviewEnable && promotion.activityNo != 'none'
62
54
  },
63
55
  },
64
56
  { target: 'loaded' },
@@ -86,51 +78,21 @@ export default function (request) {
86
78
  actions: 'setQrcode',
87
79
  cond: (context, event) => {
88
80
  const { siteConfig = {}, promotion = {} } = context
89
- const { walletMode = '', bonusPreviewEnable } = siteConfig
90
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
81
+ const { bonusPreviewEnable } = siteConfig
82
+ return bonusPreviewEnable && promotion.activityNo != 'none'
91
83
  },
92
84
  },
93
- {
94
- target: 'debouncing',
95
- actions: ['setQrcode', 'setPromotionDefaultAmount'],
96
- cond: (context, event) => context.siteConfig?.walletMode === '3' && context.promotion?.minimumAmount,
97
- },
98
85
  {
99
86
  actions: 'setQrcode',
100
87
  },
101
88
  ],
102
89
  SELECT_AMOUNT: [
103
- {
104
- target: 'debouncing',
105
- actions: 'setAmount',
106
- cond: 'isDoubleWalletMode',
107
- },
108
- {
109
- target: 'pending',
110
- actions: 'addAmount',
111
- cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
112
- },
113
- {
114
- target: 'pending',
115
- actions: 'setAmount',
116
- cond: 'isFreeWalletMode',
117
- },
118
- {
119
- target: 'debouncing',
120
- actions: 'addAmount',
121
- cond: 'isGrandTotalEnable',
122
- },
123
90
  {
124
91
  target: 'debouncing',
125
92
  actions: 'setAmount',
126
93
  },
127
94
  ],
128
95
  KEY_IN: [
129
- {
130
- target: 'pending',
131
- actions: 'setAmount',
132
- cond: 'isFreeWalletMode',
133
- },
134
96
  {
135
97
  target: 'calculating',
136
98
  actions: 'setAmount',
@@ -138,51 +100,9 @@ export default function (request) {
138
100
  ],
139
101
  },
140
102
  },
141
- pending: {
142
- on: {
143
- SELECT_AMOUNT: [
144
- {
145
- actions: 'addAmount',
146
- cond: 'isGrandTotalEnable',
147
- },
148
- {
149
- actions: 'setAmount',
150
- },
151
- ],
152
- KEY_IN: {
153
- actions: 'setAmount',
154
- },
155
- CONFIRM: {
156
- target: 'calculating',
157
- },
158
- BACK: {
159
- target: 'loaded',
160
- },
161
- },
162
- },
163
103
  debouncing: {
164
104
  on: {
165
105
  SELECT_AMOUNT: [
166
- {
167
- target: 'debouncing',
168
- actions: 'setAmount',
169
- cond: 'isDoubleWalletMode',
170
- },
171
- {
172
- target: 'debouncing',
173
- actions: 'addAmount',
174
- cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
175
- },
176
- {
177
- target: 'debouncing',
178
- actions: 'setAmount',
179
- cond: 'isFreeWalletMode',
180
- },
181
- {
182
- target: 'debouncing',
183
- actions: 'addAmount',
184
- cond: 'isGrandTotalEnable',
185
- },
186
106
  {
187
107
  target: 'debouncing',
188
108
  actions: 'setAmount',
@@ -202,26 +122,6 @@ export default function (request) {
202
122
  entry: 'clearCalculation',
203
123
  on: {
204
124
  SELECT_AMOUNT: [
205
- {
206
- target: 'debouncing',
207
- actions: 'setAmount',
208
- cond: 'isDoubleWalletMode',
209
- },
210
- {
211
- target: 'pending',
212
- actions: 'addAmount',
213
- cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
214
- },
215
- {
216
- target: 'pending',
217
- actions: 'setAmount',
218
- cond: 'isFreeWalletMode',
219
- },
220
- {
221
- target: 'debouncing',
222
- actions: 'addAmount',
223
- cond: 'isGrandTotalEnable',
224
- },
225
125
  {
226
126
  target: 'debouncing',
227
127
  actions: 'setAmount',
@@ -240,11 +140,6 @@ export default function (request) {
240
140
  invoke: {
241
141
  src: 'fetchCalculation',
242
142
  onDone: [
243
- {
244
- target: 'submitting',
245
- actions: 'setCalculation',
246
- cond: 'isFreeWalletMode',
247
- },
248
143
  {
249
144
  target: 'calculated',
250
145
  actions: 'setCalculation',
@@ -258,16 +153,6 @@ export default function (request) {
258
153
  calculated: {
259
154
  on: {
260
155
  SELECT_AMOUNT: [
261
- {
262
- target: 'pending',
263
- actions: 'addAmount',
264
- cond: (context, event) => context.siteConfig?.walletMode === '2' && context.grandTotalEnable === 1,
265
- },
266
- {
267
- target: 'pending',
268
- actions: 'setAmount',
269
- cond: 'isFreeWalletMode',
270
- },
271
156
  {
272
157
  target: 'debouncing',
273
158
  actions: 'addAmount',
@@ -314,8 +199,8 @@ export default function (request) {
314
199
  actions: 'setQrcode',
315
200
  cond: (context, event) => {
316
201
  const { siteConfig = {}, promotion = {} } = context
317
- const { walletMode = '', bonusPreviewEnable } = siteConfig
318
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
202
+ const { bonusPreviewEnable } = siteConfig
203
+ return bonusPreviewEnable && promotion.activityNo != 'none'
319
204
  },
320
205
  },
321
206
  {
@@ -395,19 +280,8 @@ export default function (request) {
395
280
  promotion,
396
281
  }
397
282
  }),
398
- setPromotionDefaultAmount: assign((context, event) => {
399
- return {
400
- selectedAmount: context.promotion.minimumAmount,
401
- }
402
- }),
403
283
  },
404
284
  guards: {
405
- isDoubleWalletMode: (context, event) => {
406
- return context.siteConfig?.walletMode === '4'
407
- },
408
- isFreeWalletMode: (context, event) => {
409
- return context.siteConfig?.walletMode === '2'
410
- },
411
285
  isGrandTotalEnable: (context, event) => {
412
286
  return context.grandTotalEnable === 1
413
287
  },
@@ -45,24 +45,8 @@ export default function (request) {
45
45
  },
46
46
  },
47
47
  step1: {
48
- initial: 'promotion',
48
+ initial: 'idle',
49
49
  states: {
50
- promotion: {
51
- always: [
52
- {
53
- target: 'idle',
54
- cond: 'isDoubleWalletMode',
55
- },
56
- {
57
- target: 'calculating',
58
- actions: 'setPromotionDefaultAmount',
59
- cond: 'hasMinPromotionDeposit',
60
- },
61
- {
62
- target: 'idle',
63
- },
64
- ],
65
- },
66
50
  idle: {},
67
51
  calculating: {
68
52
  invoke: {
@@ -104,11 +88,10 @@ export default function (request) {
104
88
  {
105
89
  target: 'pending',
106
90
  cond: (context, event) => {
107
- const { siteConfig = {}, calculation, promotion } = context
108
- const { walletMode } = siteConfig
91
+ const { calculation, promotion } = context
109
92
  const { promotionsNo, activityNo } = promotion
110
93
  const isNoBonus = promotionsNo === 'none' || activityNo === 'none'
111
- return walletMode === '4' && !!calculation && !isNoBonus
94
+ return !!calculation && !isNoBonus
112
95
  },
113
96
  },
114
97
  {
@@ -231,16 +214,8 @@ export default function (request) {
231
214
  promotion: event.data,
232
215
  }
233
216
  }),
234
- setPromotionDefaultAmount: assign((context, event) => {
235
- return {
236
- amount: context.promotion.minimumAmount,
237
- }
238
- }),
239
217
  },
240
218
  guards: {
241
- isDoubleWalletMode: (context, event) => {
242
- return context.siteConfig?.walletMode === '4'
243
- },
244
219
  isCalculable: (context, event) => {
245
220
  const {
246
221
  amount,
@@ -254,9 +229,6 @@ export default function (request) {
254
229
  isProcessing: (context, event) => {
255
230
  return context.processing
256
231
  },
257
- hasMinPromotionDeposit: (context, event) => {
258
- return context.promotion?.minimumAmount
259
- },
260
232
  },
261
233
  services: {
262
234
  fetchPaymentDetail: async (context, event) => {
@@ -74,8 +74,8 @@ export default function (request) {
74
74
  target: 'fetching',
75
75
  cond: (context, event) => {
76
76
  const { siteConfig = {}, promotion = {} } = context
77
- const { walletMode = '', bonusPreviewEnable } = siteConfig
78
- return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
77
+ const { bonusPreviewEnable } = siteConfig
78
+ return bonusPreviewEnable && promotion.activityNo != 'none'
79
79
  },
80
80
  },
81
81
  { target: 'loaded' },
@@ -40,7 +40,7 @@ export default function (request) {
40
40
  gameCode: null,
41
41
  name: null,
42
42
  },
43
- walletMode: null,
43
+ walletType: null,
44
44
  lang: 'en_US',
45
45
  isMobile: new UAParser().getResult().device.type,
46
46
  gameURL: null,
@@ -81,7 +81,7 @@ export default function (request) {
81
81
  },
82
82
  ENTER_GAME: {
83
83
  target: 'connecting',
84
- actions: ['setGameInfo', 'setLang', 'setWalletMode'],
84
+ actions: ['setGameInfo', 'setLang', 'setwalletType'],
85
85
  },
86
86
  MENU_ENTER_GAME: {
87
87
  target: 'connecting',
@@ -411,8 +411,8 @@ export default function (request) {
411
411
  const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
412
412
  return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
413
413
  }),
414
- setWalletMode: assign((context, event) => {
415
- return { walletMode: event.data.walletMode }
414
+ setwalletType: assign((context, event) => {
415
+ return { walletType: event.data.walletType }
416
416
  }),
417
417
  setLang: assign((context, event) => {
418
418
  const lang = event.data.locale.replace('-', '_')
@@ -550,7 +550,7 @@ export default function (request) {
550
550
  },
551
551
  connectGame: async (context, event) => {
552
552
  const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
553
- const { lang, isMobile, walletMode } = context
553
+ const { lang, isMobile, walletType } = context
554
554
  const { providerId, gameId, gameTypeId, mappingId } = context.game
555
555
  const params = {
556
556
  provider_id: providerId,
@@ -560,7 +560,7 @@ export default function (request) {
560
560
  is_demo: false,
561
561
  is_mobile: isMobile === 'mobile' ? 'y' : null,
562
562
  lang,
563
- selected_wallet_type: walletMode,
563
+ selected_wallet_type: walletType,
564
564
  return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
565
565
  }
566
566
  const { type, redirect_url, gameToken, gameHtml, wallet_type } = await request.send(api.playGame(params))
@@ -7,7 +7,6 @@ export default function (request) {
7
7
  id: 'promotions',
8
8
  initial: 'loading',
9
9
  context: {
10
- noBonus: {},
11
10
  userInfo: {},
12
11
  siteConfig: {},
13
12
  withdrawRule: {},
@@ -87,10 +86,10 @@ export default function (request) {
87
86
  actions: {
88
87
  setPromotionsList: assign((context, event) => {
89
88
  const promotionsList = JSON.parse(JSON.stringify(event.data))
90
- const { noBonus, userInfo, siteConfig } = context
89
+ const { userInfo, siteConfig } = context
91
90
  const { withdraw_rule, balance, bank_amount } = userInfo
92
- const { currencyConversionLimit, walletMode } = siteConfig
93
- const balanceAvailable = parseFloat(`${walletMode === '4' ? bank_amount : balance}`) < parseFloat(`${currencyConversionLimit}`)
91
+ const { currencyConversionLimit } = siteConfig
92
+ const balanceAvailable = parseFloat(bank_amount) < parseFloat(`${currencyConversionLimit}`)
94
93
  const isFreeLimitRule = withdraw_rule.includes('FREE_LIMIT')
95
94
  const includesDefaultRule = withdraw_rule === 'DEFAULT' || withdraw_rule.includes('FREE_DEFAULT')
96
95
 
@@ -112,7 +111,7 @@ export default function (request) {
112
111
  }
113
112
  return {
114
113
  promotionsList,
115
- selectedPromo: siteConfig?.walletMode === '4' ? promotionsList[0] : noBonus,
114
+ selectedPromo: promotionsList[0],
116
115
  }
117
116
  }),
118
117
  setSelectedPromo: assign((context, event) => {
@@ -17,6 +17,9 @@ export default function () {
17
17
  idle: {},
18
18
  },
19
19
  on: {
20
+ DEFAULT_SETTING: {
21
+ actions: 'setSetting',
22
+ },
20
23
  MODIFY_SETTING: {
21
24
  actions: 'saveSetting',
22
25
  },
@@ -29,7 +32,13 @@ export default function () {
29
32
  const setting = JSON.parse(localStorage.getItem('setting')) || { sound: soundPlay, music: musicPlay }
30
33
  return { ...setting }
31
34
  }),
35
+ setSetting: assign((context, event) => {
36
+ console.log('*[DEV_ONLY]預設SETTING')
37
+ const { sound, music, locale } = event.data
38
+ return { sound, music, locale }
39
+ }),
32
40
  saveSetting: assign((context, event) => {
41
+ console.log('*[DEV_ONLY]修改SETTING')
33
42
  const { sound, music, locale } = event.data
34
43
  localStorage.setItem('setting', JSON.stringify({ sound, music, locale }))
35
44
  return { sound, music, locale }
@@ -147,7 +147,6 @@ export default function (request) {
147
147
  },
148
148
  SET_ATTACHMENT_TYPE: {
149
149
  actions: 'setAttachmentType',
150
- cond: 'isNewWalletMode',
151
150
  },
152
151
  POOL: {
153
152
  target: 'pooling',
@@ -323,7 +322,7 @@ export default function (request) {
323
322
  balance,
324
323
  siteConfig,
325
324
  userInfo,
326
- attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
325
+ attachmentType: 'withdraw',
327
326
  }
328
327
  }),
329
328
  updateWithdrawCondition: assign((context, event) => {
@@ -434,7 +433,6 @@ export default function (request) {
434
433
  isOtpRequired: (context, event) => {
435
434
  return event.data?.status === 'otp-verifying'
436
435
  },
437
- isNewWalletMode: (context, event) => context.siteConfig.walletMode > 0,
438
436
  },
439
437
  services: {
440
438
  fetchInitData: async (context, event) => {
@@ -355,7 +355,7 @@ export default function (request) {
355
355
  const methods = siteConfig?.paymentMethods?.withdraw || []
356
356
  return {
357
357
  methods,
358
- attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
358
+ attachmentType: 'withdraw',
359
359
  }
360
360
  }),
361
361
  setMode: assign((context, event) => {
@@ -397,9 +397,8 @@ export default function (request) {
397
397
  return { bindingPaymentList, bindingPaymentInfo, boundBanks: combinedData, currentBank: combinedData[0] }
398
398
  }),
399
399
  preset: assign((context, event) => {
400
- const { siteConfig } = context
401
400
  return {
402
- attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
401
+ attachmentType: 'withdraw',
403
402
  }
404
403
  }),
405
404
  setMode: assign((context, event) => {
@@ -193,7 +193,6 @@ export default function (request) {
193
193
  },
194
194
  SET_ATTACHMENT_TYPE: {
195
195
  actions: 'setAttachmentType',
196
- cond: 'isNewWalletMode',
197
196
  },
198
197
  SUBMIT: [
199
198
  {
@@ -359,7 +358,7 @@ export default function (request) {
359
358
  balance,
360
359
  siteConfig,
361
360
  userInfo,
362
- attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
361
+ attachmentType: 'withdraw',
363
362
  }
364
363
  }),
365
364
  updateWithdrawCondition: assign((context, event) => {
@@ -453,7 +452,6 @@ export default function (request) {
453
452
  isOtpRequired: (context, event) => {
454
453
  return event.data?.status === 'otp-verifying'
455
454
  },
456
- isNewWalletMode: (context, event) => context.siteConfig.walletMode > 0,
457
455
  isNotWithdrawMinDepositAmount: (context, event) => {
458
456
  const { withdrawCheck } = context
459
457
  return !withdrawCheck?.passDepositeLimit
@@ -373,7 +373,7 @@ export default function (request) {
373
373
  const methods = siteConfig?.paymentMethods?.withdraw || []
374
374
  return {
375
375
  methods,
376
- attachmentType: siteConfig.walletMode > 0 ? 'withdraw' : null,
376
+ attachmentType: 'withdraw',
377
377
  }
378
378
  }),
379
379
  setMode: assign((context, event) => {