@jetthai/cuora 1.1.343-dev-2 → 1.1.343-dev-4
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 +36 -0
- package/package.json +1 -1
- package/src/machine/dragon_tiger_ranking.js +4 -2
- package/src/machine/websocket.js +18 -14
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,42 @@
|
|
|
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.343-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.343-dev-3...v1.1.343-dev-4) (2025-03-14)
|
|
6
|
+
|
|
7
|
+
### [1.1.343-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-6...v1.1.343-dev-3) (2025-03-13)
|
|
8
|
+
|
|
9
|
+
### [1.1.343-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-5...v1.1.343-dev-2) (2025-03-13)
|
|
10
|
+
|
|
11
|
+
### [1.1.343-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-12...v1.1.343-dev-1) (2025-03-13)
|
|
12
|
+
|
|
13
|
+
### [1.1.341-dev-12](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-4...v1.1.341-dev-12) (2025-03-12)
|
|
14
|
+
|
|
15
|
+
### [1.1.341-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-10...v1.1.341-dev-11) (2025-03-11)
|
|
16
|
+
|
|
17
|
+
### [1.1.341-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.343...v1.1.341-dev-10) (2025-03-11)
|
|
18
|
+
|
|
19
|
+
### [1.1.343](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-9...v1.1.343) (2025-03-11)
|
|
20
|
+
|
|
21
|
+
### [1.1.341-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-3...v1.1.341-dev-9) (2025-03-10)
|
|
22
|
+
|
|
23
|
+
### [1.1.341-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-7...v1.1.341-dev-8) (2025-03-10)
|
|
24
|
+
|
|
25
|
+
### [1.1.341-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.342...v1.1.341-dev-7) (2025-03-10)
|
|
26
|
+
|
|
27
|
+
### [1.1.342](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-6...v1.1.342) (2025-03-10)
|
|
28
|
+
|
|
29
|
+
### [1.1.341-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-2...v1.1.341-dev-6) (2025-03-06)
|
|
30
|
+
|
|
31
|
+
### [1.1.341-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-1...v1.1.341-dev-5) (2025-03-06)
|
|
32
|
+
|
|
33
|
+
### [1.1.341-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-3...v1.1.341-dev-4) (2025-03-03)
|
|
34
|
+
|
|
35
|
+
### [1.1.341-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-2...v1.1.341-dev-3) (2025-03-03)
|
|
36
|
+
|
|
37
|
+
### [1.1.341-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-1...v1.1.341-dev-2) (2025-02-27)
|
|
38
|
+
|
|
39
|
+
### [1.1.341-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.341...v1.1.341-dev-1) (2025-02-27)
|
|
40
|
+
|
|
5
41
|
### [1.1.343-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.341-rank-5...v1.1.343-dev-2) (2025-03-13)
|
|
6
42
|
|
|
7
43
|
### [1.1.343-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.341-dev-12...v1.1.343-dev-1) (2025-03-13)
|
package/package.json
CHANGED
|
@@ -37,6 +37,7 @@ export default function (request) {
|
|
|
37
37
|
playerRanking: {},
|
|
38
38
|
gameRanking: [],
|
|
39
39
|
topRanking: [],
|
|
40
|
+
settleStatus: false,
|
|
40
41
|
// 前端這邊用的選單資料 { cycle, round }
|
|
41
42
|
options: {},
|
|
42
43
|
},
|
|
@@ -121,12 +122,13 @@ export default function (request) {
|
|
|
121
122
|
}
|
|
122
123
|
}),
|
|
123
124
|
setRanking: assign((context, event) => {
|
|
124
|
-
const topRanking = event.data?.topRanking?.map((rank) => transGameData(rank))
|
|
125
|
+
const topRanking = event.data?.topRanking?.map((rank) => transGameData(rank)) || []
|
|
125
126
|
return {
|
|
126
127
|
description: event.data?.description,
|
|
127
128
|
descriptionUrl: event.data?.descriptionUrl,
|
|
128
|
-
topRanking: topRanking
|
|
129
|
+
topRanking: topRanking,
|
|
129
130
|
playerRanking: transGameData(event.data?.playerRanking) || {},
|
|
131
|
+
settleStatus: !!topRanking[0]?.settleStatus,
|
|
130
132
|
}
|
|
131
133
|
}),
|
|
132
134
|
setRankingGames: assign((context, event) => {
|
package/src/machine/websocket.js
CHANGED
|
@@ -176,19 +176,22 @@ export default function (request) {
|
|
|
176
176
|
}),
|
|
177
177
|
pushEvent: assign((context, value) => {
|
|
178
178
|
const { analytics } = context
|
|
179
|
-
const { data, event } = value.data
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
179
|
+
const { data, event, isTracking } = value.data
|
|
180
|
+
if (isTracking) {
|
|
181
|
+
analytics?.push(
|
|
182
|
+
{
|
|
183
|
+
event: event,
|
|
184
|
+
paymentMethod: data.paymentMethod,
|
|
185
|
+
transaction_id: data.transactionId,
|
|
186
|
+
currency: data.currency,
|
|
187
|
+
value: data.value,
|
|
188
|
+
app_value: data.value,
|
|
189
|
+
},
|
|
190
|
+
{ eventID: data.transactionId }
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (event === 'purchase' && data?.isFirst === true && isTracking) {
|
|
192
195
|
analytics?.push(
|
|
193
196
|
{
|
|
194
197
|
event: 'first_deposit',
|
|
@@ -271,6 +274,7 @@ export default function (request) {
|
|
|
271
274
|
clientSocket.on('activity-info', (data) => {
|
|
272
275
|
console.log('[socket][activity-info]:', data)
|
|
273
276
|
callback({ type: 'ACTIVITY_INFO', data })
|
|
277
|
+
callback({ type: 'PUSH_ANALYTICS', data })
|
|
274
278
|
})
|
|
275
279
|
|
|
276
280
|
// 監聽 activity-reward-info 事件
|
|
@@ -287,7 +291,7 @@ export default function (request) {
|
|
|
287
291
|
|
|
288
292
|
// 監聽 payment-info 事件
|
|
289
293
|
clientSocket.on('payment-info', (data) => {
|
|
290
|
-
console.log('[socket][payment-info]:', data
|
|
294
|
+
console.log('[socket][payment-info]:', data)
|
|
291
295
|
if (data.windowType === 'toast') {
|
|
292
296
|
callback({ type: 'ACTIVITY_INFO', data })
|
|
293
297
|
}
|