@jetthai/cuora 1.1.343-dev-5 → 1.1.343-dev-7

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 CHANGED
@@ -2,6 +2,12 @@
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-7](https://github.com/jetthai/cuora-module/compare/v1.1.343-dev-6...v1.1.343-dev-7) (2025-03-17)
6
+
7
+ ### [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)
8
+
9
+ ### [1.1.343-depositEvent-1](https://github.com/jetthai/cuora-module/compare/v1.1.343...v1.1.343-depositEvent-1) (2025-03-14)
10
+
5
11
  ### [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
12
 
7
13
  ### [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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.343-dev-5",
3
+ "version": "1.1.343-dev-7",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -69,7 +69,7 @@ export default function (request) {
69
69
  },
70
70
  },
71
71
  checkSocketConnect: {
72
- always: [{ target: 'fetchSocket', cond: 'isNeedConnect' }, { target: 'connected' }],
72
+ always: [{ target: 'fetchSocket' }, { target: 'connected' }],
73
73
  },
74
74
  },
75
75
  on: {
@@ -92,6 +92,7 @@ export default function (request) {
92
92
  },
93
93
  CHECK_SOCKET: {
94
94
  target: 'checkSocketConnect',
95
+ cond: 'isNeedConnect',
95
96
  },
96
97
  ACTIVITY_INFO: {
97
98
  actions: 'setActivityInfo',
@@ -176,19 +177,22 @@ export default function (request) {
176
177
  }),
177
178
  pushEvent: assign((context, value) => {
178
179
  const { analytics } = context
179
- const { data, event } = value.data
180
- analytics?.push(
181
- {
182
- event: event,
183
- paymentMethod: data.paymentMethod,
184
- transaction_id: data.transactionId,
185
- currency: data.currency,
186
- value: data.value,
187
- app_value: data.value,
188
- },
189
- { eventID: data.transactionId }
190
- )
191
- if (event === 'purchase' && data?.isFirst === true) {
180
+ const { data, event, isTracking } = value.data
181
+ if (isTracking) {
182
+ analytics?.push(
183
+ {
184
+ event: event,
185
+ paymentMethod: data.paymentMethod,
186
+ transaction_id: data.transactionId,
187
+ currency: data.currency,
188
+ value: data.value,
189
+ app_value: data.value,
190
+ },
191
+ { eventID: data.transactionId }
192
+ )
193
+ }
194
+
195
+ if (event === 'purchase' && data?.isFirst === true && isTracking) {
192
196
  analytics?.push(
193
197
  {
194
198
  event: 'first_deposit',
@@ -271,6 +275,7 @@ export default function (request) {
271
275
  clientSocket.on('activity-info', (data) => {
272
276
  console.log('[socket][activity-info]:', data)
273
277
  callback({ type: 'ACTIVITY_INFO', data })
278
+ callback({ type: 'PUSH_ANALYTICS', data })
274
279
  })
275
280
 
276
281
  // 監聽 activity-reward-info 事件
@@ -287,7 +292,7 @@ export default function (request) {
287
292
 
288
293
  // 監聽 payment-info 事件
289
294
  clientSocket.on('payment-info', (data) => {
290
- console.log('[socket][payment-info]:', data, data.windowType)
295
+ console.log('[socket][payment-info]:', data)
291
296
  if (data.windowType === 'toast') {
292
297
  callback({ type: 'ACTIVITY_INFO', data })
293
298
  }