@jetthai/cuora 1.1.343-dev-5 → 1.1.343-dev-6
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 +4 -0
- package/package.json +1 -1
- package/src/machine/websocket.js +18 -14
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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-6](https://github.com/jetthai/cuora-module/compare/v1.1.343-dev-5...v1.1.343-dev-6) (2025-03-17)
|
|
6
|
+
|
|
7
|
+
### [1.1.343-depositEvent-1](https://github.com/jetthai/cuora-module/compare/v1.1.343...v1.1.343-depositEvent-1) (2025-03-14)
|
|
8
|
+
|
|
5
9
|
### [1.1.343-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.343-dev-4...v1.1.343-dev-5) (2025-03-14)
|
|
6
10
|
|
|
7
11
|
### [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)
|
package/package.json
CHANGED
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
|
}
|