@jetthai/cuora 1.1.333 → 1.1.335

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.
@@ -38,6 +38,7 @@ import honor_board_cash from './honor_board_cash.js'
38
38
  import honor_board from './honor_board.js'
39
39
  import user_photo from './user_photo.js'
40
40
  import navbar from './navbar.js'
41
+ import websocket from './websocket.js'
41
42
 
42
43
  export default {
43
44
  ...activity,
@@ -80,4 +81,5 @@ export default {
80
81
  user_photo,
81
82
  navbar,
82
83
  ...withdraw,
84
+ websocket,
83
85
  }
@@ -0,0 +1,352 @@
1
+ import { assign, createMachine } from 'xstate'
2
+ import { io } from 'socket.io-client'
3
+
4
+ export default function (request) {
5
+ const { socketURL, bucketName, clientId, sentry } = request.config
6
+ const maxReconnectCount = 3
7
+ return createMachine(
8
+ {
9
+ id: 'socket',
10
+ initial: 'idle',
11
+ context: {
12
+ clientSocket: null,
13
+ reconnectCount: 0,
14
+ connectStatus: 0, // 0: 未連線, 1: 連線中, 2: 連線成功,
15
+ connectError: null,
16
+ analytics: null,
17
+ url: `https://storage.googleapis.com/${bucketName}/site_resources/${clientId}/target/target.json`,
18
+ socketURL: socketURL,
19
+ socketData: {},
20
+ },
21
+ states: {
22
+ idle: {},
23
+ fetchSocket: {
24
+ invoke: {
25
+ src: 'fetchSocket',
26
+ onDone: {
27
+ target: 'connecting',
28
+ actions: 'saveSocketURL',
29
+ },
30
+ onError: {
31
+ target: 'idle',
32
+ },
33
+ },
34
+ },
35
+ connecting: {
36
+ entry: 'setConnecting',
37
+ invoke: {
38
+ src: 'connectSocket',
39
+ onDone: {
40
+ actions: 'setSocket',
41
+ target: 'connected',
42
+ },
43
+ onError: {
44
+ target: 'disconnected',
45
+ actions: 'setConnectError',
46
+ },
47
+ },
48
+ },
49
+ connected: {
50
+ invoke: {
51
+ src: 'listenToSocketEvents', // 監聽事件
52
+ },
53
+ },
54
+ disconnected: {
55
+ after: {
56
+ 0: {
57
+ target: 'reconnect',
58
+ cond: 'isReconnect',
59
+ },
60
+ },
61
+ },
62
+ reconnect: {
63
+ after: {
64
+ 2000: {
65
+ actions: 'setReconnectCount',
66
+ target: 'connecting',
67
+ cond: 'isNeedConnect',
68
+ },
69
+ },
70
+ },
71
+ checkSocketConnect: {
72
+ always: [{ target: 'fetchSocket', cond: 'isNeedConnect' }, { target: 'connected' }],
73
+ },
74
+ },
75
+ on: {
76
+ CONNECT: {
77
+ target: 'fetchSocket',
78
+ cond: 'isNeedConnect',
79
+ },
80
+ SET_CONNECTED: {
81
+ actions: 'setSocket',
82
+ },
83
+ CONNECT_ERROR: {
84
+ actions: 'setConnectError',
85
+ },
86
+ DISCONNECT: {
87
+ actions: 'setDisconnected',
88
+ },
89
+ DISCONNECT_SOCKET: {
90
+ actions: 'disconnectSocket',
91
+ target: 'idle',
92
+ },
93
+ CHECK_SOCKET: {
94
+ target: 'checkSocketConnect',
95
+ },
96
+ ACTIVITY_INFO: {
97
+ actions: 'setActivityInfo',
98
+ },
99
+ CLEAR_SOCKET_DATA: {
100
+ actions: 'clearSocketData',
101
+ },
102
+ SET_ANALYTICS: {
103
+ actions: 'setAnalytics',
104
+ },
105
+ PUSH_ANALYTICS: {
106
+ actions: 'pushEvent',
107
+ },
108
+ },
109
+ },
110
+ {
111
+ actions: {
112
+ saveSocketURL: assign((context, event) => {
113
+ const { socketURL } = event.data
114
+ // console.log('[socket][saveSocketURL] socketURL:', socketURL)
115
+ return { socketURL }
116
+ }),
117
+ setSocket: assign((context, event) => {
118
+ console.log('[socket][setSocket] clientSocket:', event.data.id)
119
+ return {
120
+ clientSocket: event.data,
121
+ connectStatus: 2, // 0: 未連線, 1: 連線中, 2: 連線成功
122
+ }
123
+ }),
124
+ setConnectError: assign((context, event) => {
125
+ const error = event.data
126
+ const { analytics, connectError } = context
127
+ if (connectError === null) {
128
+ sentry?.captureException(`[socket] connectError ${error}`)
129
+ analytics?.push({
130
+ event: 'connect_error',
131
+ message: error,
132
+ })
133
+ }
134
+ return {
135
+ connectError: error,
136
+ connectStatus: 0, // 0: 未連線, 1: 連線中, 2: 連線成功
137
+ }
138
+ }),
139
+ setConnecting: assign((context, event) => {
140
+ return {
141
+ connectStatus: 1, // 0: 未連線, 1: 連線中, 2: 連線成功
142
+ }
143
+ }),
144
+ disconnectSocket: assign((context, event) => {
145
+ // 主動觸發斷開socket連接
146
+ let { clientSocket } = context
147
+ console.log('[socket][disconnectSocket]')
148
+ if (clientSocket) {
149
+ clientSocket.disconnect()
150
+ clientSocket = null
151
+ }
152
+ return { clientSocket }
153
+ }),
154
+ setDisconnected: assign((context, event) => {
155
+ const { reason } = event
156
+ const { analytics } = context
157
+ if (reason !== 'io client disconnect') {
158
+ analytics?.push({
159
+ event: 'socket_disconnect',
160
+ message: reason,
161
+ })
162
+ }
163
+ return {
164
+ connectStatus: 0, // 0: 未連線, 1: 連線中, 2: 連線成功
165
+ }
166
+ }),
167
+ setActivityInfo: assign((context, event) => {
168
+ const { data } = event
169
+ return { socketData: data }
170
+ }),
171
+ clearSocketData: assign({
172
+ socketData: (_, event) => {},
173
+ }),
174
+ setAnalytics: assign({
175
+ analytics: (_, event) => event.data,
176
+ }),
177
+ pushEvent: assign((context, value) => {
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) {
192
+ analytics?.push(
193
+ {
194
+ event: 'first_deposit',
195
+ paymentMethod: data.paymentMethod,
196
+ transaction_id: data.transactionId,
197
+ currency: data.currency,
198
+ value: data.value,
199
+ app_value: data.value,
200
+ },
201
+ { eventID: data.transactionId }
202
+ )
203
+ }
204
+ }),
205
+ setReconnectCount: assign((context, event) => {
206
+ let { reconnectCount } = context
207
+ reconnectCount++
208
+ return { reconnectCount }
209
+ }),
210
+ },
211
+ guards: {
212
+ isNeedConnect: (context, event) => {
213
+ const { connectStatus, clientSocket } = context
214
+ // 檢查 Socket 是否已連接
215
+ if (connectStatus == 1 || (clientSocket && clientSocket?.connected)) {
216
+ // console.log(`[socket] [isNeedConnect] 不做socket連線`)
217
+ return false
218
+ } else {
219
+ // console.log(`[socket] [isNeedConnect] 重新socket連線`)
220
+ return true
221
+ }
222
+ },
223
+ isReconnect: (context, event) => {
224
+ const { reconnectCount, connectError } = context
225
+ return reconnectCount < maxReconnectCount && connectError === 'io server disconnect'
226
+ },
227
+ },
228
+ services: {
229
+ fetchSocket: async (context, event) => {
230
+ // 取得 Socket 連線資訊及選線
231
+ const { url } = context
232
+ const socketTester = new SocketTester(url)
233
+ const socketURL = await socketTester.test()
234
+ console.log('[socket][fetchSocket] socketURL:', socketURL)
235
+ return { socketURL }
236
+ },
237
+ connectSocket: async (context, event) => {
238
+ // 連接 Socket
239
+ const { socketURL } = context
240
+ const authToken = request.getToken()
241
+ console.log('[socket][connectSocket] socketURL:', socketURL)
242
+ const clientSocket = io(`${socketURL}/frontend`, {
243
+ withCredentials: true,
244
+ forceNew: true,
245
+ transports: ['websocket', 'polling'],
246
+ auth: {
247
+ Authorization: authToken,
248
+ },
249
+ })
250
+ return new Promise((resolve, reject) => {
251
+ clientSocket.on('connect', () => {
252
+ console.log('[socket][connect] success', clientSocket.id)
253
+ resolve(clientSocket) // 成功後返回 socket 實例
254
+ })
255
+
256
+ clientSocket.on('connect_error', (error) => {
257
+ console.log('[socket][connect_error] error', error.message)
258
+ reject(error.message) // 連接錯誤
259
+ })
260
+ })
261
+ },
262
+ listenToSocketEvents: (context) => (callback) => {
263
+ // 監聽事件
264
+ const { clientSocket } = context
265
+
266
+ if (!clientSocket) {
267
+ console.log('[socket][listenToSocketEvents] Socket is not connected')
268
+ }
269
+
270
+ // 監聽 activity-info 事件
271
+ clientSocket.on('activity-info', (data) => {
272
+ console.log('[socket][activity-info]:', data)
273
+ callback({ type: 'ACTIVITY_INFO', data })
274
+ })
275
+
276
+ // 監聽 payment-info 事件
277
+ clientSocket.on('payment-info', (data) => {
278
+ console.log('[socket][payment-info]:', data, data.windowType)
279
+ if (data.windowType === 'toast') {
280
+ callback({ type: 'ACTIVITY_INFO', data })
281
+ }
282
+
283
+ callback({ type: 'PUSH_ANALYTICS', data })
284
+ })
285
+
286
+ // 監聽 'connect' 事件
287
+ clientSocket.on('connect', () => {
288
+ // console.log('[socket] [listenToSocketEvents] [connect] :', clientSocket.id)
289
+ callback({ type: 'SET_CONNECTED', data: clientSocket })
290
+ })
291
+
292
+ // 連線錯誤時觸發此事件'connect_error'
293
+ clientSocket.on('connect_error', (error) => {
294
+ // console.log('[socket] [listenToSocketEvents] [connect_error]:', error.message)
295
+ callback({ type: 'CONNECT_ERROR', data: error.message })
296
+ })
297
+
298
+ // 斷開連線時觸發此事件'disconnect'
299
+ clientSocket.on('disconnect', (data) => {
300
+ // console.log('[socket] [listenToSocketEvents] [disconnect] data:', data)
301
+ callback({ type: 'DISCONNECT', reason: data })
302
+ })
303
+ },
304
+ },
305
+ }
306
+ )
307
+ }
308
+
309
+ class SocketTester {
310
+ constructor(url) {
311
+ this.url = url
312
+ this.socket = []
313
+ }
314
+
315
+ async init() {
316
+ const target = await fetch(this.url)
317
+ const { socket } = await target.json()
318
+ this.socket = socket
319
+ console.log(`[socket] this.socket:`, this.socket)
320
+ }
321
+
322
+ async test() {
323
+ try {
324
+ if (this.socket.length === 0) {
325
+ await this.init()
326
+ }
327
+ const { url, index } = await Promise.any(
328
+ this.socket.map((url, i) => {
329
+ return this.ping(url, i)
330
+ })
331
+ )
332
+ console.info(`[Socket] Host ${index} is chosen. (${url})`)
333
+ return url
334
+ } catch (error) {
335
+ console.error('[Socket] Socket Test Fail.', error)
336
+ return serviceUrl
337
+ }
338
+ }
339
+
340
+ async ping(url, index) {
341
+ let ts, response
342
+ try {
343
+ ts = new Date().getTime()
344
+ response = await fetch(`${url}/ping/status`)
345
+ return { url, index }
346
+ } finally {
347
+ const speed = new Date().getTime() - ts
348
+ const status = !!response?.ok ? 'Success' : 'Failure'
349
+ console.info(`[Socket] Host: ${index}, URL: ${url}, Status: ${status}, Speed: ${speed}ms`)
350
+ }
351
+ }
352
+ }
@@ -58,39 +58,35 @@ export default function (request) {
58
58
  src: 'withdrawCheck',
59
59
  onDone: [
60
60
  {
61
- target: 'notWithdrawMinDepositAmount',
62
- cond: 'isNotWithdrawMinDepositAmount',
61
+ target: 'checkingWithdrawStatus',
63
62
  actions: assign((context, event) => {
64
63
  return {
65
64
  withdrawCheck: event.data,
66
65
  }
67
66
  }),
68
67
  },
69
- {
70
- target: 'passWithdrawCooldownTime',
71
- cond: 'isPassWithdrawCooldownTime',
72
- actions: assign((context, event) => {
73
- return {
74
- withdrawCheck: event.data,
75
- }
76
- }),
77
- },
78
- {
79
- target: 'notWithdrawable',
80
- cond: 'isNotWithdrawable',
81
- },
82
- {
83
- target: 'withdrawable',
84
- },
85
68
  ],
86
69
  onError: {
87
70
  target: '#withdraw_krway.fail',
88
71
  },
89
72
  },
90
73
  },
74
+ checkingWithdrawStatus: {
75
+ always: [
76
+ // 提款最低存款金額
77
+ { target: 'notWithdrawMinDepositAmount', cond: 'isNotWithdrawMinDepositAmount' },
78
+ // 提款冷卻時間
79
+ { target: 'passWithdrawCooldownTime', cond: 'isPassWithdrawCooldownTime' },
80
+ // 提款服務時間
81
+ { target: 'withdrawServiceTime', cond: 'isNotWIthdrawServiceTime' },
82
+ { target: 'notWithdrawable', cond: 'isNotWithdrawable' },
83
+ { target: 'withdrawable' },
84
+ ],
85
+ },
91
86
  notWithdrawMinDepositAmount: {},
92
87
  passWithdrawCooldownTime: {},
93
88
  inProcessing: {},
89
+ withdrawServiceTime: {},
94
90
  notWithdrawable: {},
95
91
  withdrawable: {
96
92
  on: {
@@ -180,10 +176,16 @@ export default function (request) {
180
176
  return !enableWithdraw || balance < minWithdrawAmount
181
177
  },
182
178
  isNotWithdrawMinDepositAmount: (context, event) => {
183
- return !event.data?.passDepositeLimit
179
+ const { withdrawCheck } = context
180
+ return !withdrawCheck?.passDepositeLimit
184
181
  },
185
182
  isPassWithdrawCooldownTime: (context, event) => {
186
- return !event.data?.passWithdrawCooldownTime
183
+ const { withdrawCheck } = context
184
+ return !withdrawCheck?.passWithdrawCooldownTime
185
+ },
186
+ isNotWIthdrawServiceTime: (context, event) => {
187
+ const { withdrawCheck } = context
188
+ return !withdrawCheck?.withdrawInServiceTime
187
189
  },
188
190
  },
189
191
  services: {
@@ -168,41 +168,35 @@ export default function (request) {
168
168
  invoke: {
169
169
  src: 'withdrawCheck',
170
170
  onDone: [
171
- // 提款最低存款金額
172
171
  {
173
- target: 'notWithdrawMinDepositAmount',
174
- cond: 'isNotWithdrawMinDepositAmount',
172
+ target: 'checkingWithdrawStatus',
175
173
  actions: assign((context, event) => {
176
174
  return {
177
175
  withdrawCheck: event.data,
178
176
  }
179
177
  }),
180
178
  },
181
- // 提款冷卻時間
182
- {
183
- target: 'passWithdrawCooldownTime',
184
- cond: 'isPassWithdrawCooldownTime',
185
- actions: assign((context, event) => {
186
- return {
187
- withdrawCheck: event.data,
188
- }
189
- }),
190
- },
191
- {
192
- target: 'notWithdrawable',
193
- cond: 'isNotWithdrawable',
194
- },
195
- {
196
- target: 'withdrawable',
197
- },
198
179
  ],
199
180
  onError: {
200
181
  target: '#withdraw_manual.fail',
201
182
  },
202
183
  },
203
184
  },
185
+ checkingWithdrawStatus: {
186
+ always: [
187
+ // 提款最低存款金額
188
+ { target: 'notWithdrawMinDepositAmount', cond: 'isNotWithdrawMinDepositAmount' },
189
+ // 提款冷卻時間
190
+ { target: 'passWithdrawCooldownTime', cond: 'isPassWithdrawCooldownTime' },
191
+ // 提款服務時間
192
+ { target: 'withdrawServiceTime', cond: 'isNotWIthdrawServiceTime' },
193
+ { target: 'notWithdrawable', cond: 'isNotWithdrawable' },
194
+ { target: 'withdrawable' },
195
+ ],
196
+ },
204
197
  notWithdrawMinDepositAmount: {},
205
198
  passWithdrawCooldownTime: {},
199
+ withdrawServiceTime: {},
206
200
  notWithdrawable: {},
207
201
  unbound: {
208
202
  // to bank_binding.js
@@ -525,10 +519,16 @@ export default function (request) {
525
519
  return event.data?.status === 'otp-verifying'
526
520
  },
527
521
  isNotWithdrawMinDepositAmount: (context, event) => {
528
- return !event.data?.passDepositeLimit
522
+ const { withdrawCheck } = context
523
+ return !withdrawCheck?.passDepositeLimit
529
524
  },
530
525
  isPassWithdrawCooldownTime: (context, event) => {
531
- return !event.data?.passWithdrawCooldownTime
526
+ const { withdrawCheck } = context
527
+ return !withdrawCheck?.passWithdrawCooldownTime
528
+ },
529
+ isNotWIthdrawServiceTime: (context, event) => {
530
+ const { withdrawCheck } = context
531
+ return !withdrawCheck?.withdrawInServiceTime
532
532
  },
533
533
  },
534
534
  services: {
@@ -142,38 +142,34 @@ export default function (request) {
142
142
  src: 'withdrawCheck',
143
143
  onDone: [
144
144
  {
145
- target: 'notWithdrawMinDepositAmount',
146
- cond: 'isNotWithdrawMinDepositAmount',
145
+ target: 'checkingWithdrawStatus',
147
146
  actions: assign((context, event) => {
148
147
  return {
149
148
  withdrawCheck: event.data,
150
149
  }
151
150
  }),
152
151
  },
153
- {
154
- target: 'passWithdrawCooldownTime',
155
- cond: 'isPassWithdrawCooldownTime',
156
- actions: assign((context, event) => {
157
- return {
158
- withdrawCheck: event.data,
159
- }
160
- }),
161
- },
162
- {
163
- target: 'notWithdrawable',
164
- cond: 'isNotWithdrawable',
165
- },
166
- {
167
- target: 'withdrawable',
168
- },
169
152
  ],
170
153
  onError: {
171
154
  target: '#withdraw_vn.fail',
172
155
  },
173
156
  },
174
157
  },
158
+ checkingWithdrawStatus: {
159
+ always: [
160
+ // 提款最低存款金額
161
+ { target: 'notWithdrawMinDepositAmount', cond: 'isNotWithdrawMinDepositAmount' },
162
+ // 提款冷卻時間
163
+ { target: 'passWithdrawCooldownTime', cond: 'isPassWithdrawCooldownTime' },
164
+ // 提款服務時間
165
+ { target: 'withdrawServiceTime', cond: 'isNotWIthdrawServiceTime' },
166
+ { target: 'notWithdrawable', cond: 'isNotWithdrawable' },
167
+ { target: 'withdrawable' },
168
+ ],
169
+ },
175
170
  notWithdrawMinDepositAmount: {},
176
171
  passWithdrawCooldownTime: {},
172
+ withdrawServiceTime: {},
177
173
  notWithdrawable: {},
178
174
  unbound: {
179
175
  // to bank_binding.js
@@ -459,10 +455,16 @@ export default function (request) {
459
455
  },
460
456
  isNewWalletMode: (context, event) => context.siteConfig.walletMode > 0,
461
457
  isNotWithdrawMinDepositAmount: (context, event) => {
462
- return !event.data?.passDepositeLimit
458
+ const { withdrawCheck } = context
459
+ return !withdrawCheck?.passDepositeLimit
463
460
  },
464
461
  isPassWithdrawCooldownTime: (context, event) => {
465
- return !event.data?.passWithdrawCooldownTime
462
+ const { withdrawCheck } = context
463
+ return !withdrawCheck?.passWithdrawCooldownTime
464
+ },
465
+ isNotWIthdrawServiceTime: (context, event) => {
466
+ const { withdrawCheck } = context
467
+ return !withdrawCheck?.withdrawInServiceTime
466
468
  },
467
469
  },
468
470
  services: {
@@ -170,38 +170,34 @@ export default function (request) {
170
170
  src: 'withdrawCheck',
171
171
  onDone: [
172
172
  {
173
- target: 'notWithdrawMinDepositAmount',
174
- cond: 'isNotWithdrawMinDepositAmount',
173
+ target: 'checkingWithdrawStatus',
175
174
  actions: assign((context, event) => {
176
175
  return {
177
176
  withdrawCheck: event.data,
178
177
  }
179
178
  }),
180
179
  },
181
- {
182
- target: 'passWithdrawCooldownTime',
183
- cond: 'isPassWithdrawCooldownTime',
184
- actions: assign((context, event) => {
185
- return {
186
- withdrawCheck: event.data,
187
- }
188
- }),
189
- },
190
- {
191
- target: 'notWithdrawable',
192
- cond: 'isNotWithdrawable',
193
- },
194
- {
195
- target: 'withdrawable',
196
- },
197
180
  ],
198
181
  onError: {
199
182
  target: '#withdraw_vn2.fail',
200
183
  },
201
184
  },
202
185
  },
186
+ checkingWithdrawStatus: {
187
+ always: [
188
+ // 提款最低存款金額
189
+ { target: 'notWithdrawMinDepositAmount', cond: 'isNotWithdrawMinDepositAmount' },
190
+ // 提款冷卻時間
191
+ { target: 'passWithdrawCooldownTime', cond: 'isPassWithdrawCooldownTime' },
192
+ // 提款服務時間
193
+ { target: 'withdrawServiceTime', cond: 'isNotWIthdrawServiceTime' },
194
+ { target: 'notWithdrawable', cond: 'isNotWithdrawable' },
195
+ { target: 'withdrawable' },
196
+ ],
197
+ },
203
198
  notWithdrawMinDepositAmount: {},
204
199
  passWithdrawCooldownTime: {},
200
+ withdrawServiceTime: {},
205
201
  notWithdrawable: {},
206
202
  unbound: {
207
203
  // to bank_binding.js
@@ -484,10 +480,16 @@ export default function (request) {
484
480
  return event.data?.status === 'otp-verifying'
485
481
  },
486
482
  isNotWithdrawMinDepositAmount: (context, event) => {
487
- return !event.data?.passDepositeLimit
483
+ const { withdrawCheck } = context
484
+ return !withdrawCheck?.passDepositeLimit
488
485
  },
489
486
  isPassWithdrawCooldownTime: (context, event) => {
490
- return !event.data?.passWithdrawCooldownTime
487
+ const { withdrawCheck } = context
488
+ return !withdrawCheck?.passWithdrawCooldownTime
489
+ },
490
+ isNotWIthdrawServiceTime: (context, event) => {
491
+ const { withdrawCheck } = context
492
+ return !withdrawCheck?.withdrawInServiceTime
491
493
  },
492
494
  },
493
495
  services: {
@@ -3,7 +3,20 @@ import urljoin from 'url-join'
3
3
  // const urljoin = require('url-join')
4
4
 
5
5
  export default class Config {
6
- constructor({ apiURL, apiVersion, clientId, appSecret, platform, version, fpToken, sentry, defaultChannel, defaultSubchannel }) {
6
+ constructor({
7
+ apiURL,
8
+ apiVersion,
9
+ clientId,
10
+ appSecret,
11
+ platform,
12
+ version,
13
+ fpToken,
14
+ sentry,
15
+ defaultChannel,
16
+ defaultSubchannel,
17
+ socketURL,
18
+ bucketName,
19
+ }) {
7
20
  this.apiURL = apiURL
8
21
  this.apiVersion = apiVersion
9
22
  this.clientId = clientId
@@ -15,6 +28,8 @@ export default class Config {
15
28
  this.sentry = sentry
16
29
  this.defaultChannel = defaultChannel
17
30
  this.defaultSubchannel = defaultSubchannel
31
+ this.socketURL = socketURL
32
+ this.bucketName = bucketName
18
33
  }
19
34
 
20
35
  setApiURL(url) {
@@ -1,5 +1,5 @@
1
1
  import uniqBy from 'lodash/uniqBy'
2
- import { load, defaultEndpoint } from '../lib/fingerprint_v3_11_2.js'
2
+ import { load, defaultEndpoint } from '../lib/fingerprint_v3_11_5.js'
3
3
 
4
4
  const reg = /fnapi\d*/
5
5