@jetthai/cuora 1.1.320-dev-9 → 1.1.321-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 -39
- package/package.json +1 -1
- package/src/api/activity.js +0 -11
- package/src/api/auth.js +2 -2
- package/src/api/game.js +0 -6
- package/src/api/user.js +0 -1
- package/src/machine/activity/activity.js +1 -1
- package/src/machine/activity/activity_cash.js +1 -1
- package/src/machine/activity/friend_invite_friends_activity.js +0 -69
- package/src/machine/activity/instant_rebate_activity.js +0 -11
- package/src/machine/auth.js +16 -0
- package/src/machine/common.js +1 -2
- package/src/machine/index.js +0 -2
- package/src/request/request.js +0 -1
- package/src/util/deviceToken.js +0 -1
- package/src/machine/game_replay.js +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -2,45 +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.320-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-7...v1.1.320-dev-8) (2024-12-06)
|
|
8
|
-
|
|
9
|
-
### [1.1.320-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-6...v1.1.320-dev-7) (2024-12-05)
|
|
10
|
-
|
|
11
|
-
### [1.1.320-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.325-dev-2...v1.1.320-dev-6) (2024-12-04)
|
|
12
|
-
|
|
13
|
-
### [1.1.325-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.325-dev-1...v1.1.325-dev-2) (2024-12-04)
|
|
14
|
-
|
|
15
|
-
### [1.1.325-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.325...v1.1.325-dev-1) (2024-12-04)
|
|
16
|
-
|
|
17
|
-
### [1.1.325](https://github.com/jetthai/cuora-module/compare/v1.1.324...v1.1.325) (2024-12-04)
|
|
18
|
-
|
|
19
|
-
### [1.1.320-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-4...v1.1.320-dev-5) (2024-12-02)
|
|
20
|
-
|
|
21
|
-
### [1.1.320-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-3...v1.1.320-dev-4) (2024-12-02)
|
|
22
|
-
|
|
23
|
-
### [1.1.320-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-2...v1.1.320-dev-3) (2024-12-02)
|
|
24
|
-
|
|
25
|
-
### [1.1.320-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-1...v1.1.320-dev-2) (2024-11-29)
|
|
26
|
-
|
|
27
|
-
### [1.1.320-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.320...v1.1.320-dev-1) (2024-11-29)
|
|
28
|
-
|
|
29
|
-
### [1.1.320-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-4...v1.1.320-dev-5) (2024-12-02)
|
|
30
|
-
|
|
31
|
-
### [1.1.320-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-3...v1.1.320-dev-4) (2024-12-02)
|
|
32
|
-
|
|
33
|
-
### [1.1.320-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-2...v1.1.320-dev-3) (2024-12-02)
|
|
34
|
-
|
|
35
|
-
### [1.1.320-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-1...v1.1.320-dev-2) (2024-11-29)
|
|
36
|
-
|
|
37
|
-
### [1.1.320-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.320...v1.1.320-dev-1) (2024-11-29)
|
|
38
|
-
|
|
39
|
-
### [1.1.324](https://github.com/jetthai/cuora-module/compare/v1.1.323...v1.1.324) (2024-12-04)
|
|
40
|
-
|
|
41
|
-
### [1.1.323](https://github.com/jetthai/cuora-module/compare/v1.1.322...v1.1.323) (2024-12-04)
|
|
42
|
-
|
|
43
|
-
### [1.1.322](https://github.com/jetthai/cuora-module/compare/v1.1.321...v1.1.322) (2024-12-03)
|
|
5
|
+
### [1.1.321-tg](https://github.com/jetthai/cuora-module/compare/v1.1.321...v1.1.321-tg) (2024-12-02)
|
|
44
6
|
|
|
45
7
|
### [1.1.321](https://github.com/jetthai/cuora-module/compare/v1.1.320...v1.1.321) (2024-12-02)
|
|
46
8
|
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -6,12 +6,6 @@ export default {
|
|
|
6
6
|
params: { appSecret, include },
|
|
7
7
|
isPublic: true,
|
|
8
8
|
}),
|
|
9
|
-
getAllActivityList: ({ appSecret, include = 'cl' }) => ({
|
|
10
|
-
url: 'all-activities/list',
|
|
11
|
-
method: 'get',
|
|
12
|
-
params: { appSecret },
|
|
13
|
-
isPublic: true,
|
|
14
|
-
}),
|
|
15
9
|
getJackpotList: ({ appSecret }) => ({
|
|
16
10
|
url: 'activities/jackpot/list',
|
|
17
11
|
method: 'get',
|
|
@@ -102,9 +96,4 @@ export default {
|
|
|
102
96
|
getInstantRebateCollectTime: () => ({ url: 'activities/rebate/collectTime', method: 'get' }),
|
|
103
97
|
instantRebateEstimate: () => ({ url: 'activities/rebate/estimate', method: 'get' }),
|
|
104
98
|
instantRebateCollect: () => ({ url: 'activities/rebate/collect', method: 'get' }),
|
|
105
|
-
instantRebateHistory: ({ startDate, endDate, appSecret }) => ({
|
|
106
|
-
url: 'activities/rebate/history',
|
|
107
|
-
method: 'post',
|
|
108
|
-
params: { startDate, endDate, appSecret },
|
|
109
|
-
}),
|
|
110
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, isSignature }) => ({
|
|
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, isSignature },
|
|
12
12
|
isPublic: true,
|
|
13
13
|
headers: { 'x-access-captcha': reCaptchaToken },
|
|
14
14
|
}),
|
package/src/api/game.js
CHANGED
|
@@ -92,10 +92,4 @@ export default {
|
|
|
92
92
|
addListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/addMyFavorite', params: { games: [code] } }),
|
|
93
93
|
removeListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/removeMyFavorite', params: { games: [code] } }),
|
|
94
94
|
getGameInfo: ({ appSecret, gameCode }) => ({ method: 'get', url: 'game/info', params: { appSecret, gameCode } }),
|
|
95
|
-
getGameReplayInfo: ({ providerId, seqNo, lang }) => ({
|
|
96
|
-
method: 'get',
|
|
97
|
-
url: 'game/gameReplay',
|
|
98
|
-
params: { providerId, seqNo, lang },
|
|
99
|
-
isPublic: true,
|
|
100
|
-
}),
|
|
101
95
|
}
|
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 }),
|
|
@@ -163,7 +163,7 @@ export default function (request) {
|
|
|
163
163
|
const isDoubleWallet = context.siteConfig?.walletMode === '4'
|
|
164
164
|
const apiCallable = hasToken && isDoubleWallet
|
|
165
165
|
const [{ data }, promotionList] = await Promise.all([
|
|
166
|
-
|
|
166
|
+
request.send(activity.getActivityList({ appSecret })),
|
|
167
167
|
apiCallable ? request.send(payment.getPromotionsList()) : [],
|
|
168
168
|
])
|
|
169
169
|
|
|
@@ -133,7 +133,7 @@ export default function (request) {
|
|
|
133
133
|
fetchList: async (context, event) => {
|
|
134
134
|
const hasToken = request.getToken()
|
|
135
135
|
const [{ data }, promotionList] = await Promise.all([
|
|
136
|
-
|
|
136
|
+
request.send(activity.getActivityList({ appSecret })),
|
|
137
137
|
hasToken ? request.send(payment.getPromotionsList()) : [],
|
|
138
138
|
])
|
|
139
139
|
|
|
@@ -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.list
|
|
273
|
-
const resopnseData = await request.send(user.getFriendsList({ type: currentType, page: listPage, row: 15 }))
|
|
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,40 +111,32 @@ 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,
|
|
130
|
-
dailyMaximumAmountReceive = 0,
|
|
131
124
|
remainingCount = 0,
|
|
132
125
|
dailyRedemptionLimit = 0,
|
|
133
126
|
reachedAmountLimit = false,
|
|
134
127
|
} = event.data
|
|
135
128
|
|
|
136
129
|
return {
|
|
137
|
-
rebateCycle,
|
|
138
130
|
showColletButton,
|
|
139
131
|
estimateStartTime,
|
|
140
132
|
estimateEndTime,
|
|
141
133
|
lastCollectTime,
|
|
142
134
|
collectAvailable,
|
|
143
135
|
cumulativeValidTurnover,
|
|
144
|
-
weekCumulativeValidTurnover,
|
|
145
136
|
cumulativeRebateAmount,
|
|
146
|
-
weekCumulativeRebateAmount,
|
|
147
137
|
actualRebateAmount,
|
|
148
138
|
rewardType,
|
|
149
139
|
singleMinimumAmountReceive,
|
|
150
|
-
dailyMaximumAmountReceive,
|
|
151
140
|
remainingCount,
|
|
152
141
|
dailyRedemptionLimit,
|
|
153
142
|
reachedAmountLimit,
|
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, isSignature } = event.data
|
|
363
|
+
return {
|
|
364
|
+
loginData: {
|
|
365
|
+
provider: 'telegram',
|
|
366
|
+
loginType,
|
|
367
|
+
additionalUserInfo,
|
|
368
|
+
isSignature,
|
|
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
|
@@ -309,8 +309,7 @@ export default function (request) {
|
|
|
309
309
|
guards: {
|
|
310
310
|
isAffiliateCodeInstructionsEnable: (context, event) => {
|
|
311
311
|
const { siteConfig } = event.data
|
|
312
|
-
|
|
313
|
-
return registerBindingAffiliateCodeInstructionsEnable ? JSON.parse(registerBindingAffiliateCodeInstructionsEnable) : false
|
|
312
|
+
return siteConfig?.registerBindingAffiliateCodeInstructionsEnable
|
|
314
313
|
},
|
|
315
314
|
},
|
|
316
315
|
services: {
|
package/src/machine/index.js
CHANGED
|
@@ -9,7 +9,6 @@ import game_search_cash from './game_search_cash.js'
|
|
|
9
9
|
import game_search_v2 from './game_search_v2.js'
|
|
10
10
|
import game_hot_new from './game_hot_new.js'
|
|
11
11
|
import game_info from './game_info.js'
|
|
12
|
-
import game_replay from './game_replay.js'
|
|
13
12
|
import inbox from './inbox.js'
|
|
14
13
|
import merge from './merge.js'
|
|
15
14
|
import payment_data from './payment_data.js'
|
|
@@ -50,7 +49,6 @@ export default {
|
|
|
50
49
|
game_search_v2,
|
|
51
50
|
game_hot_new,
|
|
52
51
|
game_info,
|
|
53
|
-
game_replay,
|
|
54
52
|
inbox,
|
|
55
53
|
merge,
|
|
56
54
|
payment_data,
|
package/src/request/request.js
CHANGED
package/src/util/deviceToken.js
CHANGED
|
@@ -23,7 +23,6 @@ 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}`)
|
|
27
26
|
sentry?.setTag('dt', dt)
|
|
28
27
|
} catch (error) {
|
|
29
28
|
console.error('[Device Token]', `${dt} from ${endpoints}`, error)
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { assign, createMachine } from 'xstate'
|
|
2
|
-
import game from '../api/game.js'
|
|
3
|
-
|
|
4
|
-
export default function (request, context) {
|
|
5
|
-
// const { appSecret } = request.config
|
|
6
|
-
const { providerId, seqNo, lang } = context
|
|
7
|
-
return createMachine(
|
|
8
|
-
{
|
|
9
|
-
id: 'game_replay',
|
|
10
|
-
initial: 'fetching',
|
|
11
|
-
context: {
|
|
12
|
-
gameReplayInfo: {},
|
|
13
|
-
},
|
|
14
|
-
states: {
|
|
15
|
-
fetching: {
|
|
16
|
-
invoke: {
|
|
17
|
-
src: 'fetchGameReplayInfo',
|
|
18
|
-
onDone: {
|
|
19
|
-
target: 'idle',
|
|
20
|
-
actions: 'setGameReplayInfo',
|
|
21
|
-
},
|
|
22
|
-
onError: {
|
|
23
|
-
target: 'idle',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
idle: {},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
actions: {
|
|
32
|
-
setGameReplayInfo: assign((context, event) => {
|
|
33
|
-
return {
|
|
34
|
-
gameReplayInfo: event.data.data,
|
|
35
|
-
}
|
|
36
|
-
}),
|
|
37
|
-
},
|
|
38
|
-
services: {
|
|
39
|
-
// 取得遊戲重播資訊
|
|
40
|
-
fetchGameReplayInfo: async (context, event) => {
|
|
41
|
-
return await request.send(game.getGameReplayInfo({ providerId, seqNo, lang }))
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
}
|