@jetthai/cuora 1.1.338-dev-10 → 1.1.338-perf-1
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 +0 -8
- package/package.json +1 -1
- package/src/api/auth.js +2 -2
- package/src/api/common.js +0 -1
- package/src/api/game.js +0 -2
- package/src/api/payment.js +2 -2
- package/src/machine/activity/activity_cash.js +1 -1
- package/src/machine/auth.js +2 -18
- package/src/machine/common.js +1 -1
- package/src/machine/deposit/crypto_button.js +2 -2
- package/src/machine/deposit/float.js +2 -2
- package/src/machine/deposit/loadcard_vn.js +6 -6
- package/src/machine/deposit/qrcode_v2.js +6 -6
- package/src/machine/deposit/vpay.js +2 -2
- package/src/machine/error.js +0 -10
- package/src/machine/game_v2_1.js +5 -25
- package/src/machine/side_v2.js +1 -8
- package/src/machine/withdraw/withdraw_manual.js +12 -21
- package/src/machine/withdraw/withdraw_vn.js +9 -9
- package/src/request/request.js +1 -0
- package/src/util/deviceToken.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,16 +2,8 @@
|
|
|
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.338-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-9...v1.1.338-dev-10) (2025-02-17)
|
|
6
|
-
|
|
7
|
-
### [1.1.338-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-8...v1.1.338-dev-9) (2025-02-17)
|
|
8
|
-
|
|
9
|
-
### [1.1.338-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.338-dev-7...v1.1.338-dev-8) (2025-02-14)
|
|
10
|
-
|
|
11
5
|
### [1.1.338-perf-1](https://github.com/jetthai/cuora-module/compare/v1.1.338...v1.1.338-perf-1) (2025-02-12)
|
|
12
6
|
|
|
13
|
-
### [1.1.338-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.338...v1.1.338-dev-7) (2025-02-14)
|
|
14
|
-
|
|
15
7
|
### [1.1.338](https://github.com/jetthai/cuora-module/compare/v1.1.337...v1.1.338) (2025-02-04)
|
|
16
8
|
|
|
17
9
|
### [1.1.337](https://github.com/jetthai/cuora-module/compare/v1.1.336...v1.1.337) (2025-02-04)
|
package/package.json
CHANGED
package/src/api/auth.js
CHANGED
|
@@ -5,10 +5,10 @@ export default {
|
|
|
5
5
|
method: 'post',
|
|
6
6
|
isPublic: true,
|
|
7
7
|
}),
|
|
8
|
-
login: ({ username, password, provider, countryCode, phone, email, dt, reCaptchaToken
|
|
8
|
+
login: ({ username, password, provider, countryCode, phone, email, dt, reCaptchaToken }) => ({
|
|
9
9
|
url: 'login',
|
|
10
10
|
method: 'post',
|
|
11
|
-
params: { username, password, provider, countryCode, phone, email, dt
|
|
11
|
+
params: { username, password, provider, countryCode, phone, email, dt },
|
|
12
12
|
isPublic: true,
|
|
13
13
|
headers: { 'x-access-captcha': reCaptchaToken },
|
|
14
14
|
}),
|
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
|
}
|
package/src/api/payment.js
CHANGED
|
@@ -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
|
|
225
|
+
getWithdrawRulePreview: ({ applyType, applyNo, amount }) => ({
|
|
226
226
|
url: `payment/v2/bankWallet/promotion/preview`,
|
|
227
227
|
method: 'post',
|
|
228
|
-
params: { applyType, applyNo, amount
|
|
228
|
+
params: { applyType, applyNo, amount },
|
|
229
229
|
}),
|
|
230
230
|
applyPromotions: ({ promotionsNo, amount }) => ({
|
|
231
231
|
url: `payment/v2/bankWallet/promotion/apply`,
|
package/src/machine/auth.js
CHANGED
|
@@ -33,7 +33,6 @@ export default function (request) {
|
|
|
33
33
|
email: null,
|
|
34
34
|
username: null,
|
|
35
35
|
password: null,
|
|
36
|
-
additionalUserInfo: null,
|
|
37
36
|
},
|
|
38
37
|
countryAbbr: null,
|
|
39
38
|
userInfo: {},
|
|
@@ -272,10 +271,6 @@ export default function (request) {
|
|
|
272
271
|
LOGIN_APP: {
|
|
273
272
|
target: '.authenticationApp',
|
|
274
273
|
},
|
|
275
|
-
LOGIN_TELEGRAM: {
|
|
276
|
-
target: '.authentication',
|
|
277
|
-
actions: 'setLoginTelegram',
|
|
278
|
-
},
|
|
279
274
|
SET_PLAY: {
|
|
280
275
|
actions: 'setPlay',
|
|
281
276
|
},
|
|
@@ -358,17 +353,6 @@ export default function (request) {
|
|
|
358
353
|
},
|
|
359
354
|
}
|
|
360
355
|
}),
|
|
361
|
-
setLoginTelegram: assign((context, event) => {
|
|
362
|
-
const { loginType, additionalUserInfo, isSignature } = event.data
|
|
363
|
-
return {
|
|
364
|
-
loginData: {
|
|
365
|
-
provider: 'telegram',
|
|
366
|
-
loginType,
|
|
367
|
-
additionalUserInfo,
|
|
368
|
-
isSignature,
|
|
369
|
-
},
|
|
370
|
-
}
|
|
371
|
-
}),
|
|
372
356
|
fetchToken: assign((context, event) => {
|
|
373
357
|
const token = storage.get(tokenKey)
|
|
374
358
|
return {
|
|
@@ -430,7 +414,7 @@ export default function (request) {
|
|
|
430
414
|
}),
|
|
431
415
|
redirectTo3Party: async (context, event) => {
|
|
432
416
|
const { provider, channel, subchannel, fc } = event.data
|
|
433
|
-
const deviceTokenEnable = context.siteConfig?.dtVerify
|
|
417
|
+
const deviceTokenEnable = context.siteConfig?.dtVerify === '1'
|
|
434
418
|
|
|
435
419
|
const dt = await getDeviceToken({
|
|
436
420
|
fpToken,
|
|
@@ -513,7 +497,7 @@ export default function (request) {
|
|
|
513
497
|
return await request.send(user.getUserInfo())
|
|
514
498
|
},
|
|
515
499
|
checkDeviceToken: async (context, event) => {
|
|
516
|
-
const deviceTokenEnable = context.siteConfig?.dtVerify
|
|
500
|
+
const deviceTokenEnable = context.siteConfig?.dtVerify === '1'
|
|
517
501
|
if (deviceTokenEnable) {
|
|
518
502
|
const { exist } = await request.send(user.checkDt())
|
|
519
503
|
if (!exist) {
|
package/src/machine/common.js
CHANGED
|
@@ -55,8 +55,8 @@ export default function (request) {
|
|
|
55
55
|
target: 'fetching',
|
|
56
56
|
cond: (context, event) => {
|
|
57
57
|
const { siteConfig = {}, promotion = {}, selectedCrypto } = context
|
|
58
|
-
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
59
|
-
return !!selectedCrypto && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
58
|
+
const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
|
|
59
|
+
return !!selectedCrypto && walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
|
|
60
60
|
},
|
|
61
61
|
},
|
|
62
62
|
{ target: 'loaded' },
|
|
@@ -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 { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
|
|
76
|
+
return walletMode === '4' && bonusPreviewEnable === '1' && 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 { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
|
|
53
|
+
return !!selectedCard && walletMode === '4' && bonusPreviewEnable === '1' && 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 { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
|
|
82
|
+
return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -216,8 +216,8 @@ export default function (request) {
|
|
|
216
216
|
actions: 'setCard',
|
|
217
217
|
cond: (context, event) => {
|
|
218
218
|
const { siteConfig = {}, promotion = {} } = context
|
|
219
|
-
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
220
|
-
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
219
|
+
const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
|
|
220
|
+
return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
|
|
221
221
|
},
|
|
222
222
|
},
|
|
223
223
|
{
|
|
@@ -49,8 +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'
|
|
52
|
+
const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
|
|
53
|
+
return !!selectedQrcode && walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
{
|
|
@@ -86,8 +86,8 @@ export default function (request) {
|
|
|
86
86
|
actions: 'setQrcode',
|
|
87
87
|
cond: (context, event) => {
|
|
88
88
|
const { siteConfig = {}, promotion = {} } = context
|
|
89
|
-
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
90
|
-
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
89
|
+
const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
|
|
90
|
+
return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
|
|
91
91
|
},
|
|
92
92
|
},
|
|
93
93
|
{
|
|
@@ -314,8 +314,8 @@ export default function (request) {
|
|
|
314
314
|
actions: 'setQrcode',
|
|
315
315
|
cond: (context, event) => {
|
|
316
316
|
const { siteConfig = {}, promotion = {} } = context
|
|
317
|
-
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
318
|
-
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
317
|
+
const { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
|
|
318
|
+
return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
|
|
319
319
|
},
|
|
320
320
|
},
|
|
321
321
|
{
|
|
@@ -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 { walletMode = '', bonusPreviewEnable = '0' } = siteConfig
|
|
78
|
+
return walletMode === '4' && bonusPreviewEnable === '1' && promotion.activityNo != 'none'
|
|
79
79
|
},
|
|
80
80
|
},
|
|
81
81
|
{ target: 'loaded' },
|
package/src/machine/error.js
CHANGED
|
@@ -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
|
}
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -40,13 +40,11 @@ export default function (request) {
|
|
|
40
40
|
gameCode: null,
|
|
41
41
|
name: null,
|
|
42
42
|
},
|
|
43
|
-
walletMode: null,
|
|
44
43
|
lang: 'en_US',
|
|
45
44
|
isMobile: new UAParser().getResult().device.type,
|
|
46
45
|
gameURL: null,
|
|
47
46
|
gameToken: null,
|
|
48
47
|
gameHtml: null,
|
|
49
|
-
gameWalletType: null,
|
|
50
48
|
switchGame: null,
|
|
51
49
|
isGame: false,
|
|
52
50
|
...oldContext,
|
|
@@ -82,7 +80,7 @@ export default function (request) {
|
|
|
82
80
|
},
|
|
83
81
|
ENTER_GAME: {
|
|
84
82
|
target: 'connecting',
|
|
85
|
-
actions: ['setGameInfo', 'setLang'
|
|
83
|
+
actions: ['setGameInfo', 'setLang'],
|
|
86
84
|
},
|
|
87
85
|
MENU_ENTER_GAME: {
|
|
88
86
|
target: 'connecting',
|
|
@@ -204,10 +202,9 @@ export default function (request) {
|
|
|
204
202
|
actions: ['setSwitch', 'setLang'],
|
|
205
203
|
},
|
|
206
204
|
ENTER_GAME_PAUSE: {
|
|
207
|
-
actions: ['setIsGame', 'resetContent'
|
|
205
|
+
actions: ['setIsGame', 'resetContent'],
|
|
208
206
|
},
|
|
209
207
|
LEAVE_GAME_REFRESH: {
|
|
210
|
-
target: '#game.oldTimer',
|
|
211
208
|
actions: 'setIsGame',
|
|
212
209
|
},
|
|
213
210
|
},
|
|
@@ -451,9 +448,6 @@ export default function (request) {
|
|
|
451
448
|
gameURL: (context, event) => {
|
|
452
449
|
return event.data.gameURL
|
|
453
450
|
},
|
|
454
|
-
gameWalletType: (context, event) => {
|
|
455
|
-
return event.data.gameWalletType
|
|
456
|
-
},
|
|
457
451
|
}),
|
|
458
452
|
clearGameInfo: assign((context, event) => {
|
|
459
453
|
return { game: { providerId: null, gameId: null, gameTypeId: null, mappingId: null } }
|
|
@@ -469,9 +463,6 @@ export default function (request) {
|
|
|
469
463
|
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
|
|
470
464
|
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
471
465
|
}),
|
|
472
|
-
setWalletMode: assign((context, event) => {
|
|
473
|
-
return { walletMode: event.data.walletMode }
|
|
474
|
-
}),
|
|
475
466
|
setLang: assign((context, event) => {
|
|
476
467
|
const lang = event.data.locale.replace('-', '_')
|
|
477
468
|
return { lang }
|
|
@@ -613,7 +604,7 @@ export default function (request) {
|
|
|
613
604
|
},
|
|
614
605
|
connectGame: async (context, event) => {
|
|
615
606
|
const returnProviders = ['RSG', 'KP', 'EPICWIN', 'AMBSLOT', 'SEXY_VENUS', 'SEXY_SEXYBCRT', 'PG', 'NPG']
|
|
616
|
-
const { lang, isMobile
|
|
607
|
+
const { lang, isMobile } = context
|
|
617
608
|
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
618
609
|
const params = {
|
|
619
610
|
provider_id: providerId,
|
|
@@ -623,11 +614,10 @@ export default function (request) {
|
|
|
623
614
|
is_demo: false,
|
|
624
615
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
625
616
|
lang,
|
|
626
|
-
selected_wallet_type: walletMode,
|
|
627
617
|
return_url: returnProviders.includes(providerId) ? `${window.location.origin}${context.base}return` : window.location.href, // For providers to return.
|
|
628
618
|
}
|
|
629
|
-
const { type, redirect_url, gameToken, gameHtml
|
|
630
|
-
return { type, gameToken, gameHtml, gameURL: redirect_url
|
|
619
|
+
const { type, redirect_url, gameToken, gameHtml } = await request.send(api.playGame(params))
|
|
620
|
+
return { type, gameToken, gameHtml, gameURL: redirect_url }
|
|
631
621
|
},
|
|
632
622
|
disconnectGame: async (context, event) => {
|
|
633
623
|
const uid_site = event.data
|
|
@@ -669,16 +659,6 @@ const oldActions = {
|
|
|
669
659
|
optionMap: { ...optionMap, ...event.data },
|
|
670
660
|
}
|
|
671
661
|
}),
|
|
672
|
-
resetSHA: assign((context, event) => {
|
|
673
|
-
return {
|
|
674
|
-
sha: {
|
|
675
|
-
status: null,
|
|
676
|
-
},
|
|
677
|
-
isStatusChanged: false,
|
|
678
|
-
statusMap: {},
|
|
679
|
-
optionMap: {},
|
|
680
|
-
}
|
|
681
|
-
}),
|
|
682
662
|
}
|
|
683
663
|
|
|
684
664
|
const oldGuards = {
|
package/src/machine/side_v2.js
CHANGED
|
@@ -5,7 +5,7 @@ export default function (request) {
|
|
|
5
5
|
return createMachine(
|
|
6
6
|
{
|
|
7
7
|
id: 'side',
|
|
8
|
-
initial: '
|
|
8
|
+
initial: 'loading',
|
|
9
9
|
context: {
|
|
10
10
|
menu: null,
|
|
11
11
|
menuItemStack: [],
|
|
@@ -14,13 +14,6 @@ export default function (request) {
|
|
|
14
14
|
defaultMenuItemStack: [],
|
|
15
15
|
},
|
|
16
16
|
states: {
|
|
17
|
-
init: {
|
|
18
|
-
on: {
|
|
19
|
-
START_MENU: {
|
|
20
|
-
target: 'loading',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
17
|
loading: {
|
|
25
18
|
invoke: {
|
|
26
19
|
src: 'getMenu',
|
|
@@ -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
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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,8 +407,7 @@ export default function (request) {
|
|
|
408
407
|
}
|
|
409
408
|
}),
|
|
410
409
|
updateWithdrawCondition: assign((context, event) => {
|
|
411
|
-
const { enableWithdraw, enableWithdrawAmount, currentWithdrawLimit, targetWithdrawLimit, balance
|
|
412
|
-
event.data
|
|
410
|
+
const { enableWithdraw, enableWithdrawAmount, currentWithdrawLimit, targetWithdrawLimit, balance } = event.data
|
|
413
411
|
const withdrawRules = event.data?.rules || []
|
|
414
412
|
const rules = withdrawRules.filter((rule) => rule.maxWithdrawAmount > 0)
|
|
415
413
|
const lastMatchedIndex = findLastIndex(rules, (rule) => balance >= rule.greaterEqualThen)
|
|
@@ -433,8 +431,6 @@ export default function (request) {
|
|
|
433
431
|
enableWithdrawAmount: +enableWithdrawAmount,
|
|
434
432
|
enableWithdraw,
|
|
435
433
|
withdrawRules,
|
|
436
|
-
freeGameDetail,
|
|
437
|
-
freeGameExpired,
|
|
438
434
|
}
|
|
439
435
|
}),
|
|
440
436
|
setWithdrawRulePreview: assign((context, event) => {
|
|
@@ -511,13 +507,8 @@ export default function (request) {
|
|
|
511
507
|
return !context.boundBanks?.length
|
|
512
508
|
},
|
|
513
509
|
isConvertible: (context, event) => {
|
|
514
|
-
const { enableWithdraw
|
|
515
|
-
|
|
516
|
-
if (isFreeGame) {
|
|
517
|
-
return freeGameDetail[0]?.freeGameCount === freeGameDetail[0]?.freeGameUsedCount
|
|
518
|
-
} else {
|
|
519
|
-
return enableWithdraw
|
|
520
|
-
}
|
|
510
|
+
const { enableWithdraw } = context
|
|
511
|
+
return enableWithdraw
|
|
521
512
|
},
|
|
522
513
|
isNotWithdrawable: (context, event) => {
|
|
523
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
},
|
package/src/request/request.js
CHANGED
package/src/util/deviceToken.js
CHANGED
|
@@ -23,6 +23,7 @@ const getDeviceToken = async ({ fpToken, sentry, hosts, enable = true }) => {
|
|
|
23
23
|
throw new Error('[Device Token] No token from FingerprintJS.')
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
console.log('[Device Token]', `${dt} from ${endpoints}`)
|
|
26
27
|
sentry?.setTag('dt', dt)
|
|
27
28
|
} catch (error) {
|
|
28
29
|
console.error('[Device Token]', `${dt} from ${endpoints}`, error)
|