@jetthai/cuora 1.1.58 → 1.1.59

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.
@@ -1,5 +1,6 @@
1
- import FingerprintJS from '@fingerprintjs/fingerprintjs-pro'
1
+ // import FingerprintJS from '@fingerprintjs/fingerprintjs-pro'
2
2
  import uniqBy from 'lodash/uniqBy'
3
+ import { load } from '../lib/fingerprint.js'
3
4
 
4
5
  const reg = /fnapi\d*/
5
6
  // const reg = /(?<=https:\/\/)\w+(?=(\.\w+\.\w+))/
@@ -11,7 +12,8 @@ const getDeviceToken = async ({ fpToken, sentry, hosts }) => {
11
12
  hosts.map((host) => host.replace(reg, 'fp')),
12
13
  (url) => url
13
14
  )
14
- const fp = await FingerprintJS.load({ apiKey: fpToken, endpoint: endpoints })
15
+ // const fp = await FingerprintJS.load({ apiKey: fpToken, endpoint: endpoints })
16
+ const fp = await load({ endpoint: endpoints })
15
17
  const result = await fp.get({ timeout: 30000 })
16
18
  dt = result.visitorId
17
19