@jetthai/cuora 1.1.318-dev-4 → 1.1.318-tg
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 -7
- package/package.json +1 -1
- package/src/api/activity.js +0 -5
- package/src/api/auth.js +2 -2
- package/src/api/common.js +0 -1
- package/src/api/user.js +0 -1
- package/src/machine/activity/friend_invite_friends_activity.js +0 -69
- package/src/machine/activity/instant_rebate_activity.js +0 -9
- package/src/machine/auth.js +16 -0
- package/src/machine/common.js +4 -36
- package/src/machine/deposit/crypto_button.js +1 -1
- package/src/machine/deposit/float.js +1 -1
- package/src/machine/deposit/loadcard_vn.js +1 -1
- package/src/machine/deposit/qrcode_v2.js +1 -1
- package/src/machine/deposit/vpay.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,13 +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.318-
|
|
6
|
-
|
|
7
|
-
### [1.1.318-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.318-dev-2...v1.1.318-dev-3) (2024-11-19)
|
|
8
|
-
|
|
9
|
-
### [1.1.318-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.318-dev-1...v1.1.318-dev-2) (2024-11-18)
|
|
10
|
-
|
|
11
|
-
### [1.1.318-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.318...v1.1.318-dev-1) (2024-11-15)
|
|
5
|
+
### [1.1.318-tg](https://github.com/jetthai/cuora-module/compare/v1.1.318...v1.1.318-tg) (2024-11-19)
|
|
12
6
|
|
|
13
7
|
### [1.1.318](https://github.com/jetthai/cuora-module/compare/v1.1.317...v1.1.318) (2024-11-11)
|
|
14
8
|
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -96,9 +96,4 @@ export default {
|
|
|
96
96
|
getInstantRebateCollectTime: () => ({ url: 'activities/rebate/collectTime', method: 'get' }),
|
|
97
97
|
instantRebateEstimate: () => ({ url: 'activities/rebate/estimate', method: 'get' }),
|
|
98
98
|
instantRebateCollect: () => ({ url: 'activities/rebate/collect', method: 'get' }),
|
|
99
|
-
instantRebateHistory: ({ startDate, endDate, appSecret }) => ({
|
|
100
|
-
url: 'activities/rebate/history',
|
|
101
|
-
method: 'post',
|
|
102
|
-
params: { startDate, endDate, appSecret },
|
|
103
|
-
}),
|
|
104
99
|
}
|
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, additionalUserInfo, loginType }) => ({
|
|
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, additionalUserInfo, loginType },
|
|
12
12
|
isPublic: true,
|
|
13
13
|
headers: { 'x-access-captcha': reCaptchaToken },
|
|
14
14
|
}),
|
package/src/api/common.js
CHANGED
|
@@ -5,5 +5,4 @@ export default {
|
|
|
5
5
|
broadcast: () => ({ url: 'broadcast', method: 'get', isPublic: true }),
|
|
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
|
-
getDefaultAffiliateCode: ({ appSecret }) => ({ url: 'getAffiliateCode', params: { appSecret }, method: 'get', isPublic: true }),
|
|
9
8
|
}
|
package/src/api/user.js
CHANGED
|
@@ -18,7 +18,6 @@ export default {
|
|
|
18
18
|
getFriendsHome: () => ({ url: 'friends/home', method: 'get' }),
|
|
19
19
|
getFriendsDashboard: () => ({ url: 'friends/dashboard', method: 'get' }),
|
|
20
20
|
getFriendsDashboardList: ({ level, page, row }) => ({ url: 'friends/dashboard/list', method: 'post', params: { level, page, row } }),
|
|
21
|
-
getFriendsList: ({ type, page, row }) => ({ url: 'friends/reward-list', method: 'post', params: { type, page, row } }),
|
|
22
21
|
postFriends: ({ friendCode }) => ({ url: 'friends', method: 'post', params: { friendCode } }),
|
|
23
22
|
passwordRecovery: (recoveryData) => ({ url: 'recovery', method: 'post', params: recoveryData, isPublic: true }),
|
|
24
23
|
passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }),
|
|
@@ -18,16 +18,11 @@ export default function (request) {
|
|
|
18
18
|
commission: 0,
|
|
19
19
|
downLine: 0,
|
|
20
20
|
activeDownLine: 0,
|
|
21
|
-
allDownLineCounts: 0,
|
|
22
|
-
receivedCounts: 0,
|
|
23
21
|
levelTable: [],
|
|
24
22
|
pastTable: [],
|
|
25
23
|
levelDownLine: {},
|
|
26
|
-
friendsList: {},
|
|
27
24
|
currentLevel: 1,
|
|
28
|
-
currentType: 'ALL',
|
|
29
25
|
page: 1,
|
|
30
|
-
listPage: 1,
|
|
31
26
|
},
|
|
32
27
|
initial: 'fetching1',
|
|
33
28
|
states: {
|
|
@@ -68,20 +63,11 @@ export default function (request) {
|
|
|
68
63
|
target: 'fetchingList',
|
|
69
64
|
actions: ['setLevelSearch', 'reset'],
|
|
70
65
|
},
|
|
71
|
-
SELECT_TYPE: {
|
|
72
|
-
target: 'fetchingFriendsList',
|
|
73
|
-
actions: ['setTypeSearch', 'resetList'],
|
|
74
|
-
},
|
|
75
66
|
LOAD_DATA: {
|
|
76
67
|
target: 'fetchingList',
|
|
77
68
|
actions: 'setPage',
|
|
78
69
|
cond: 'isNotEnd',
|
|
79
70
|
},
|
|
80
|
-
LOAD_LIST_DATA: {
|
|
81
|
-
target: 'fetchingFriendsList',
|
|
82
|
-
actions: 'setListPage',
|
|
83
|
-
cond: 'isListNotEnd',
|
|
84
|
-
},
|
|
85
71
|
},
|
|
86
72
|
},
|
|
87
73
|
binding: {
|
|
@@ -125,18 +111,6 @@ export default function (request) {
|
|
|
125
111
|
},
|
|
126
112
|
},
|
|
127
113
|
},
|
|
128
|
-
fetchingFriendsList: {
|
|
129
|
-
invoke: {
|
|
130
|
-
src: 'fetchFriendsList',
|
|
131
|
-
onDone: {
|
|
132
|
-
target: 'idle',
|
|
133
|
-
actions: 'setFriendsList',
|
|
134
|
-
},
|
|
135
|
-
onError: {
|
|
136
|
-
target: 'idle',
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
114
|
fail: {},
|
|
141
115
|
},
|
|
142
116
|
},
|
|
@@ -181,56 +155,28 @@ export default function (request) {
|
|
|
181
155
|
currentLevel: level,
|
|
182
156
|
}
|
|
183
157
|
}),
|
|
184
|
-
setTypeSearch: assign((context, event) => {
|
|
185
|
-
const { type } = event.data
|
|
186
|
-
return {
|
|
187
|
-
currentType: type,
|
|
188
|
-
}
|
|
189
|
-
}),
|
|
190
158
|
reset: assign((context, event) => {
|
|
191
159
|
return {
|
|
192
160
|
page: 1,
|
|
193
161
|
levelDownLine: {},
|
|
194
162
|
}
|
|
195
163
|
}),
|
|
196
|
-
resetList: assign((context, event) => {
|
|
197
|
-
return {
|
|
198
|
-
listPage: 1,
|
|
199
|
-
friendsList: {},
|
|
200
|
-
}
|
|
201
|
-
}),
|
|
202
164
|
setPage: assign((context, event) => {
|
|
203
165
|
return {
|
|
204
166
|
page: context.page + 1,
|
|
205
167
|
}
|
|
206
168
|
}),
|
|
207
|
-
setListPage: assign((context, event) => {
|
|
208
|
-
return {
|
|
209
|
-
listPage: context.listPage + 1,
|
|
210
|
-
}
|
|
211
|
-
}),
|
|
212
169
|
setLevelDownLineList: assign((context, event) => {
|
|
213
170
|
return {
|
|
214
171
|
levelDownLine: event.data,
|
|
215
172
|
}
|
|
216
173
|
}),
|
|
217
|
-
setFriendsList: assign((context, event) => {
|
|
218
|
-
return {
|
|
219
|
-
friendsList: event.data,
|
|
220
|
-
receivedCounts: event.data?.rewardsDetail?.receivedCounts || 0,
|
|
221
|
-
allDownLineCounts: event.data?.rewardsDetail?.allDownLineCounts || 0,
|
|
222
|
-
}
|
|
223
|
-
}),
|
|
224
174
|
},
|
|
225
175
|
guards: {
|
|
226
176
|
isNotEnd: (context, event) => {
|
|
227
177
|
const { page } = context.levelDownLine
|
|
228
178
|
return page.current < page.total
|
|
229
179
|
},
|
|
230
|
-
isListNotEnd: (context, event) => {
|
|
231
|
-
const { page } = context.friendsList
|
|
232
|
-
return page.current < page.total
|
|
233
|
-
},
|
|
234
180
|
isFriendsEnable: (context, event) => context.friendsEnable,
|
|
235
181
|
},
|
|
236
182
|
services: {
|
|
@@ -266,21 +212,6 @@ export default function (request) {
|
|
|
266
212
|
return resopnseData
|
|
267
213
|
}
|
|
268
214
|
},
|
|
269
|
-
fetchFriendsList: async (context, event) => {
|
|
270
|
-
const { currentType, listPage, friendsList } = context
|
|
271
|
-
const copiedObj = JSON.parse(JSON.stringify(friendsList))
|
|
272
|
-
const copiedList = copiedObj.data
|
|
273
|
-
const resopnseData = await request.send(user.getFriendsList({ type: currentType, page: listPage, row: 10 }))
|
|
274
|
-
if (!!copiedList && !!resopnseData?.data?.list) {
|
|
275
|
-
const combindData = {
|
|
276
|
-
...resopnseData.data,
|
|
277
|
-
list: [...copiedList, ...resopnseData?.data?.list],
|
|
278
|
-
}
|
|
279
|
-
return combindData
|
|
280
|
-
} else {
|
|
281
|
-
return resopnseData?.data
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
215
|
},
|
|
285
216
|
}
|
|
286
217
|
)
|
|
@@ -6,7 +6,6 @@ export default function (request) {
|
|
|
6
6
|
{
|
|
7
7
|
id: 'instant_rebate_activity',
|
|
8
8
|
context: {
|
|
9
|
-
rebateCycle: null,
|
|
10
9
|
showColletButton: false,
|
|
11
10
|
estimateStartTime: null,
|
|
12
11
|
estimateEndTime: null,
|
|
@@ -14,9 +13,7 @@ export default function (request) {
|
|
|
14
13
|
lastEstimateTime: null,
|
|
15
14
|
collectAvailable: false,
|
|
16
15
|
cumulativeValidTurnover: null,
|
|
17
|
-
weekCumulativeValidTurnover: null,
|
|
18
16
|
cumulativeRebateAmount: null,
|
|
19
|
-
weekCumulativeRebateAmount: null,
|
|
20
17
|
actualRebateAmount: null,
|
|
21
18
|
rewardType: null,
|
|
22
19
|
singleMinimumAmountReceive: null,
|
|
@@ -114,16 +111,13 @@ export default function (request) {
|
|
|
114
111
|
}),
|
|
115
112
|
setEstimateResult: assign((context, event) => {
|
|
116
113
|
const {
|
|
117
|
-
rebateCycle = null,
|
|
118
114
|
showColletButton = false,
|
|
119
115
|
estimateStartTime = 0,
|
|
120
116
|
estimateEndTime = 0,
|
|
121
117
|
lastCollectTime = 0,
|
|
122
118
|
collectAvailable = false,
|
|
123
119
|
cumulativeValidTurnover = '0',
|
|
124
|
-
weekCumulativeValidTurnover = '0',
|
|
125
120
|
cumulativeRebateAmount = '0',
|
|
126
|
-
weekCumulativeRebateAmount = '0',
|
|
127
121
|
actualRebateAmount = '0',
|
|
128
122
|
rewardType = null,
|
|
129
123
|
singleMinimumAmountReceive = 0,
|
|
@@ -133,16 +127,13 @@ export default function (request) {
|
|
|
133
127
|
} = event.data
|
|
134
128
|
|
|
135
129
|
return {
|
|
136
|
-
rebateCycle,
|
|
137
130
|
showColletButton,
|
|
138
131
|
estimateStartTime,
|
|
139
132
|
estimateEndTime,
|
|
140
133
|
lastCollectTime,
|
|
141
134
|
collectAvailable,
|
|
142
135
|
cumulativeValidTurnover,
|
|
143
|
-
weekCumulativeValidTurnover,
|
|
144
136
|
cumulativeRebateAmount,
|
|
145
|
-
weekCumulativeRebateAmount,
|
|
146
137
|
actualRebateAmount,
|
|
147
138
|
rewardType,
|
|
148
139
|
singleMinimumAmountReceive,
|
package/src/machine/auth.js
CHANGED
|
@@ -33,6 +33,7 @@ export default function (request) {
|
|
|
33
33
|
email: null,
|
|
34
34
|
username: null,
|
|
35
35
|
password: null,
|
|
36
|
+
additionalUserInfo: null,
|
|
36
37
|
},
|
|
37
38
|
countryAbbr: null,
|
|
38
39
|
userInfo: {},
|
|
@@ -271,6 +272,10 @@ export default function (request) {
|
|
|
271
272
|
LOGIN_APP: {
|
|
272
273
|
target: '.authenticationApp',
|
|
273
274
|
},
|
|
275
|
+
LOGIN_TELEGRAM: {
|
|
276
|
+
target: '.authentication',
|
|
277
|
+
actions: 'setLoginTelegram',
|
|
278
|
+
},
|
|
274
279
|
SET_PLAY: {
|
|
275
280
|
actions: 'setPlay',
|
|
276
281
|
},
|
|
@@ -353,6 +358,17 @@ export default function (request) {
|
|
|
353
358
|
},
|
|
354
359
|
}
|
|
355
360
|
}),
|
|
361
|
+
setLoginTelegram: assign((context, event) => {
|
|
362
|
+
const { loginType, additionalUserInfo } = event.data
|
|
363
|
+
console.log('Machine Auth', event.data)
|
|
364
|
+
return {
|
|
365
|
+
loginData: {
|
|
366
|
+
provider: 'telegram',
|
|
367
|
+
loginType,
|
|
368
|
+
additionalUserInfo,
|
|
369
|
+
},
|
|
370
|
+
}
|
|
371
|
+
}),
|
|
356
372
|
fetchToken: assign((context, event) => {
|
|
357
373
|
const token = storage.get(tokenKey)
|
|
358
374
|
return {
|
package/src/machine/common.js
CHANGED
|
@@ -4,6 +4,9 @@ import pickBy from 'lodash/pickBy.js'
|
|
|
4
4
|
import api from '../api/common.js'
|
|
5
5
|
import storage from '../util/storage.js'
|
|
6
6
|
|
|
7
|
+
// const pickBy = require('lodash/pickBy')
|
|
8
|
+
// const UAParser = require('ua-parser-js')
|
|
9
|
+
|
|
7
10
|
export default function (request) {
|
|
8
11
|
const { appSecret, defaultChannel, defaultSubchannel } = request.config
|
|
9
12
|
return createMachine(
|
|
@@ -38,7 +41,6 @@ export default function (request) {
|
|
|
38
41
|
channel: null,
|
|
39
42
|
subchannel: null,
|
|
40
43
|
affiliateCode: null,
|
|
41
|
-
defaultAffiliateCode: null,
|
|
42
44
|
friendCode: null,
|
|
43
45
|
},
|
|
44
46
|
states: {
|
|
@@ -56,28 +58,9 @@ export default function (request) {
|
|
|
56
58
|
entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel'],
|
|
57
59
|
invoke: {
|
|
58
60
|
src: 'fetchConfig',
|
|
59
|
-
onDone: [
|
|
60
|
-
{
|
|
61
|
-
target: 'getDefaultAffiliateCode',
|
|
62
|
-
actions: 'setConfig',
|
|
63
|
-
cond: 'isAffiliateCodeInstructionsEnable',
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
target: 'idle',
|
|
67
|
-
actions: 'setConfig',
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
onError: {
|
|
71
|
-
target: 'idle',
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
getDefaultAffiliateCode: {
|
|
76
|
-
invoke: {
|
|
77
|
-
src: 'fetchDefaultAffiliateCode',
|
|
78
61
|
onDone: {
|
|
79
62
|
target: 'idle',
|
|
80
|
-
actions: '
|
|
63
|
+
actions: 'setConfig',
|
|
81
64
|
},
|
|
82
65
|
onError: {
|
|
83
66
|
target: 'idle',
|
|
@@ -200,12 +183,6 @@ export default function (request) {
|
|
|
200
183
|
layoutConfig: layoutConfigDecoded,
|
|
201
184
|
}
|
|
202
185
|
}),
|
|
203
|
-
setDefaultAffiliateCode: assign((context, event) => {
|
|
204
|
-
const { affiliateCode } = event.data
|
|
205
|
-
return {
|
|
206
|
-
defaultAffiliateCode: affiliateCode,
|
|
207
|
-
}
|
|
208
|
-
}),
|
|
209
186
|
setUA: assign((context, event) => {
|
|
210
187
|
const parser = new UAParser()
|
|
211
188
|
const userAgent = parser.getResult()
|
|
@@ -306,12 +283,6 @@ export default function (request) {
|
|
|
306
283
|
}
|
|
307
284
|
}),
|
|
308
285
|
},
|
|
309
|
-
guards: {
|
|
310
|
-
isAffiliateCodeInstructionsEnable: (context, event) => {
|
|
311
|
-
const { siteConfig } = event.data
|
|
312
|
-
return siteConfig?.registerBindingAffiliateCodeInstructionsEnable
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
286
|
services: {
|
|
316
287
|
fetchConfig: async (context, event) => {
|
|
317
288
|
const [site, layout] = await Promise.all([request.send(api.getConfig({ appSecret })), request.send(api.getLayoutConfig({ appSecret }))])
|
|
@@ -328,9 +299,6 @@ export default function (request) {
|
|
|
328
299
|
)
|
|
329
300
|
return { siteConfig: JSON.parse(decodeResult), layoutConfig: layout.config }
|
|
330
301
|
},
|
|
331
|
-
fetchDefaultAffiliateCode: async (context, event) => {
|
|
332
|
-
return await request.send(api.getDefaultAffiliateCode({ appSecret }))
|
|
333
|
-
},
|
|
334
302
|
fetchFeeds: async (context, event) => {
|
|
335
303
|
return await request.send(api.feeds({ appSecret }))
|
|
336
304
|
},
|