@lifi/widget 1.31.0 → 1.31.1
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/AppProvider.js +2 -2
- package/cjs/AppProvider.js +1 -1
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/hooks/useRouteExecution.js +1 -2
- package/cjs/utils/index.d.ts +0 -1
- package/cjs/utils/index.js +0 -1
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/useRouteExecution.js +1 -2
- package/package.json +6 -6
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/utils/index.d.ts +0 -1
- package/utils/index.js +0 -1
- package/cjs/utils/deepClone.d.ts +0 -1
- package/cjs/utils/deepClone.js +0 -7
- package/utils/deepClone.d.ts +0 -1
- package/utils/deepClone.js +0 -3
package/AppProvider.js
CHANGED
|
@@ -3,10 +3,10 @@ import { QueryClientProvider } from '@tanstack/react-query';
|
|
|
3
3
|
import { Fragment } from 'react';
|
|
4
4
|
import { MemoryRouter, useInRouterContext } from 'react-router-dom';
|
|
5
5
|
import { queryClient } from './config/queryClient';
|
|
6
|
-
import { I18nProvider, SDKProvider, SwapFormProvider,
|
|
6
|
+
import { I18nProvider, SDKProvider, SwapFormProvider, ThemeProvider, WalletProvider, WidgetProvider, } from './providers';
|
|
7
7
|
import { StoreProvider } from './stores';
|
|
8
8
|
export const AppProvider = ({ children, config, }) => {
|
|
9
|
-
return (_jsx(QueryClientProvider, Object.assign({ client: queryClient }, { children: _jsx(StoreProvider, Object.assign({ namePrefix: config === null || config === void 0 ? void 0 : config.localStorageKeyPrefix }, { children: _jsx(WidgetProvider, Object.assign({ config: config }, { children: _jsx(SDKProvider, { children: _jsx(
|
|
9
|
+
return (_jsx(QueryClientProvider, Object.assign({ client: queryClient }, { children: _jsx(StoreProvider, Object.assign({ namePrefix: config === null || config === void 0 ? void 0 : config.localStorageKeyPrefix }, { children: _jsx(WidgetProvider, Object.assign({ config: config }, { children: _jsx(SDKProvider, { children: _jsx(ThemeProvider, { children: _jsx(I18nProvider, { children: _jsx(WalletProvider, { children: _jsx(SwapFormProvider, { children: _jsx(AppRouter, { children: children }) }) }) }) }) }) })) })) })));
|
|
10
10
|
};
|
|
11
11
|
export const AppRouter = ({ children }) => {
|
|
12
12
|
const inRouterContext = useInRouterContext();
|
package/cjs/AppProvider.js
CHANGED
|
@@ -9,7 +9,7 @@ const queryClient_1 = require("./config/queryClient");
|
|
|
9
9
|
const providers_1 = require("./providers");
|
|
10
10
|
const stores_1 = require("./stores");
|
|
11
11
|
const AppProvider = ({ children, config, }) => {
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, Object.assign({ client: queryClient_1.queryClient }, { children: (0, jsx_runtime_1.jsx)(stores_1.StoreProvider, Object.assign({ namePrefix: config === null || config === void 0 ? void 0 : config.localStorageKeyPrefix }, { children: (0, jsx_runtime_1.jsx)(providers_1.WidgetProvider, Object.assign({ config: config }, { children: (0, jsx_runtime_1.jsx)(providers_1.SDKProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, Object.assign({ client: queryClient_1.queryClient }, { children: (0, jsx_runtime_1.jsx)(stores_1.StoreProvider, Object.assign({ namePrefix: config === null || config === void 0 ? void 0 : config.localStorageKeyPrefix }, { children: (0, jsx_runtime_1.jsx)(providers_1.WidgetProvider, Object.assign({ config: config }, { children: (0, jsx_runtime_1.jsx)(providers_1.SDKProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.ThemeProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.I18nProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.WalletProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.SwapFormProvider, { children: (0, jsx_runtime_1.jsx)(exports.AppRouter, { children: children }) }) }) }) }) }) })) })) })));
|
|
13
13
|
};
|
|
14
14
|
exports.AppProvider = AppProvider;
|
|
15
15
|
const AppRouter = ({ children }) => {
|
package/cjs/config/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@lifi/widget";
|
|
2
|
-
export declare const version = "1.31.
|
|
2
|
+
export declare const version = "1.31.1";
|
package/cjs/config/version.js
CHANGED
|
@@ -16,7 +16,6 @@ const shallow_1 = require("zustand/shallow");
|
|
|
16
16
|
const providers_1 = require("../providers");
|
|
17
17
|
const stores_1 = require("../stores");
|
|
18
18
|
const events_1 = require("../types/events");
|
|
19
|
-
const utils_1 = require("../utils");
|
|
20
19
|
const useWidgetEvents_1 = require("./useWidgetEvents");
|
|
21
20
|
const useRouteExecution = ({ routeId, executeInBackground, onAcceptExchangeRateUpdate, }) => {
|
|
22
21
|
const lifi = (0, providers_1.useLiFi)();
|
|
@@ -32,7 +31,7 @@ const useRouteExecution = ({ routeId, executeInBackground, onAcceptExchangeRateU
|
|
|
32
31
|
if (!routeExecution) {
|
|
33
32
|
return;
|
|
34
33
|
}
|
|
35
|
-
const clonedUpdatedRoute = (
|
|
34
|
+
const clonedUpdatedRoute = structuredClone(updatedRoute);
|
|
36
35
|
updateRoute(clonedUpdatedRoute);
|
|
37
36
|
const process = (0, stores_1.getUpdatedProcess)(routeExecution.route, clonedUpdatedRoute);
|
|
38
37
|
if (process) {
|
package/cjs/utils/index.d.ts
CHANGED
package/cjs/utils/index.js
CHANGED
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./colors"), exports);
|
|
18
|
-
__exportStar(require("./deepClone"), exports);
|
|
19
18
|
__exportStar(require("./deepMerge"), exports);
|
|
20
19
|
__exportStar(require("./elements"), exports);
|
|
21
20
|
__exportStar(require("./enum"), exports);
|
package/config/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@lifi/widget";
|
|
2
|
-
export declare const version = "1.31.
|
|
2
|
+
export declare const version = "1.31.1";
|
package/config/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/widget';
|
|
2
|
-
export const version = '1.31.
|
|
2
|
+
export const version = '1.31.1';
|
|
@@ -13,7 +13,6 @@ import { shallow } from 'zustand/shallow';
|
|
|
13
13
|
import { useLiFi, useWallet } from '../providers';
|
|
14
14
|
import { getUpdatedProcess, isRouteActive, isRouteDone, isRouteFailed, useRouteExecutionStore, useRouteExecutionStoreContext, } from '../stores';
|
|
15
15
|
import { WidgetEvent } from '../types/events';
|
|
16
|
-
import { deepClone } from '../utils';
|
|
17
16
|
import { useWidgetEvents } from './useWidgetEvents';
|
|
18
17
|
export const useRouteExecution = ({ routeId, executeInBackground, onAcceptExchangeRateUpdate, }) => {
|
|
19
18
|
const lifi = useLiFi();
|
|
@@ -29,7 +28,7 @@ export const useRouteExecution = ({ routeId, executeInBackground, onAcceptExchan
|
|
|
29
28
|
if (!routeExecution) {
|
|
30
29
|
return;
|
|
31
30
|
}
|
|
32
|
-
const clonedUpdatedRoute =
|
|
31
|
+
const clonedUpdatedRoute = structuredClone(updatedRoute);
|
|
33
32
|
updateRoute(clonedUpdatedRoute);
|
|
34
33
|
const process = getUpdatedProcess(routeExecution.route, clonedUpdatedRoute);
|
|
35
34
|
if (process) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/widget",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.1",
|
|
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
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"@lifi/sdk": "^1.7.2",
|
|
47
47
|
"@lifi/wallet-management": "^1.2.7",
|
|
48
48
|
"@mui/icons-material": "^5.11.0",
|
|
49
|
-
"@mui/lab": "^5.0.0-alpha.
|
|
50
|
-
"@mui/material": "^5.11.
|
|
49
|
+
"@mui/lab": "^5.0.0-alpha.119",
|
|
50
|
+
"@mui/material": "^5.11.8",
|
|
51
51
|
"@sentry/integrations": "^7.36.0",
|
|
52
52
|
"@sentry/react": "^7.36.0",
|
|
53
53
|
"@sentry/tracing": "^7.36.0",
|
|
54
54
|
"@tanstack/react-query": "^4.24.4",
|
|
55
|
-
"@tanstack/react-virtual": "^3.0.0-beta.
|
|
55
|
+
"@tanstack/react-virtual": "^3.0.0-beta.47",
|
|
56
56
|
"big.js": "^6.2.1",
|
|
57
57
|
"i18next": "^22.4.9",
|
|
58
58
|
"i18next-browser-languagedetector": "^7.0.1",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"mitt": "^3.0.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0",
|
|
63
|
-
"react-hook-form": "^7.43.
|
|
63
|
+
"react-hook-form": "^7.43.1",
|
|
64
64
|
"react-i18next": "^12.1.5",
|
|
65
|
-
"react-router-dom": "^6.8.
|
|
65
|
+
"react-router-dom": "^6.8.1",
|
|
66
66
|
"react-timer-hook": "^3.0.5",
|
|
67
67
|
"uuid": "^9.0.0",
|
|
68
68
|
"zustand": "^4.3.2"
|