@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.343-dev-5",
3
+ "version": "1.1.343-dev-6",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -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
- 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) {
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, data.windowType)
294
+ console.log('[socket][payment-info]:', data)
291
295
  if (data.windowType === 'toast') {
292
296
  callback({ type: 'ACTIVITY_INFO', data })
293
297
  }