@lifi/widget 1.10.2 → 1.10.3

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/config/sentry.js CHANGED
@@ -13,7 +13,7 @@ export const initSentry = (enabled) => {
13
13
  ],
14
14
  sampleRate: 1,
15
15
  tracesSampleRate: 0.2,
16
- enabled: enabled && process.env.NODE_ENV === 'production',
16
+ enabled,
17
17
  environment: process.env.NODE_ENV,
18
18
  release: version,
19
19
  });
@@ -1,2 +1,2 @@
1
1
  export declare const name = "@lifi/widget";
2
- export declare const version = "1.10.2";
2
+ export declare const version = "1.10.3";
package/config/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export const name = '@lifi/widget';
2
- export const version = '1.10.2';
2
+ export const version = '1.10.3';
@@ -1,10 +1,16 @@
1
+ /* eslint-disable consistent-return */
1
2
  import { useEffect } from 'react';
2
3
  import { initSentry } from '../config/sentry';
3
4
  export const useTelemetry = (disabled) => {
4
5
  useEffect(() => {
5
- if (process.env.NODE_ENV === 'production' && disabled) {
6
+ if (disabled) {
6
7
  console.warn('Enable crash reports and diagnostic data to be collected. This helps us to better understand how the widget is performing and where improvements need to be made.');
7
- initSentry(false);
8
+ }
9
+ else {
10
+ initSentry(true);
11
+ return () => {
12
+ initSentry(false);
13
+ };
8
14
  }
9
15
  }, [disabled]);
10
16
  };
package/index.js CHANGED
@@ -1,10 +1,8 @@
1
1
  import { App } from './App';
2
2
  import { AppDrawer } from './AppDrawer';
3
- import { initSentry } from './config/sentry';
4
3
  import './fonts/inter.css';
5
4
  import { configureReactI18next } from './i18n';
6
5
  export * from './types';
7
- initSentry(true);
8
6
  configureReactI18next();
9
7
  // ClassNameGenerator.configure((componentName) => componentName.replace('Mui', ''));
10
8
  export const LiFiWidget = App;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/widget",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.",
5
5
  "sideEffects": false,
6
6
  "main": "./index.js",