@jetthai/cuora 1.1.336-dev-10 → 1.1.337
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 +1 -9
- package/package.json +1 -1
- package/src/api/common.js +0 -1
- package/src/api/game.js +0 -2
- package/src/api/payment.js +2 -2
- package/src/machine/auth.js +2 -2
- 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/withdraw/withdraw_manual.js +12 -19
- package/src/machine/withdraw/withdraw_vn.js +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,15 +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.
|
|
6
|
-
|
|
7
|
-
### [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)
|
|
8
|
-
|
|
9
|
-
### [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)
|
|
10
|
-
|
|
11
|
-
### [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)
|
|
12
|
-
|
|
13
|
-
### [1.1.336-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.336...v1.1.336-dev-6) (2025-01-24)
|
|
5
|
+
### [1.1.337](https://github.com/jetthai/cuora-module/compare/v1.1.336...v1.1.337) (2025-02-04)
|
|
14
6
|
|
|
15
7
|
### [1.1.336](https://github.com/jetthai/cuora-module/compare/v1.1.335...v1.1.336) (2025-01-14)
|
|
16
8
|
|
package/package.json
CHANGED
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
|
@@ -414,7 +414,7 @@ export default function (request) {
|
|
|
414
414
|
}),
|
|
415
415
|
redirectTo3Party: async (context, event) => {
|
|
416
416
|
const { provider, channel, subchannel, fc } = event.data
|
|
417
|
-
const deviceTokenEnable = context.siteConfig?.dtVerify
|
|
417
|
+
const deviceTokenEnable = context.siteConfig?.dtVerify === '1'
|
|
418
418
|
|
|
419
419
|
const dt = await getDeviceToken({
|
|
420
420
|
fpToken,
|
|
@@ -497,7 +497,7 @@ export default function (request) {
|
|
|
497
497
|
return await request.send(user.getUserInfo())
|
|
498
498
|
},
|
|
499
499
|
checkDeviceToken: async (context, event) => {
|
|
500
|
-
const deviceTokenEnable = context.siteConfig?.dtVerify
|
|
500
|
+
const deviceTokenEnable = context.siteConfig?.dtVerify === '1'
|
|
501
501
|
if (deviceTokenEnable) {
|
|
502
502
|
const { exist } = await request.send(user.checkDt())
|
|
503
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
|
}
|
|
@@ -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,7 +407,7 @@ export default function (request) {
|
|
|
408
407
|
}
|
|
409
408
|
}),
|
|
410
409
|
updateWithdrawCondition: assign((context, event) => {
|
|
411
|
-
const { enableWithdraw, enableWithdrawAmount, currentWithdrawLimit, targetWithdrawLimit, balance
|
|
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
|
|
513
|
-
|
|
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
|
-
|
|
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
|
},
|