@lifi/widget 1.13.1 → 1.13.2
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/components/Step/CircularProgress.d.ts +1 -0
- package/components/SwapButton/ButtonTooltip.d.ts +1 -0
- package/components/SwapInput/SwapInputAdornment.d.ts +1 -0
- package/config/sentry.js +3 -0
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/useChains.d.ts +10 -10
- package/package.json +8 -8
- package/pages/SelectTokenPage/ChainSelect.d.ts +1 -0
- package/pages/SelectTokenPage/SearchTokenInput.d.ts +1 -0
- package/pages/SelectWalletPage/SelectWalletPage.d.ts +1 -0
- package/pages/SelectWalletPage/SelectWalletPage.js +1 -1
- package/pages/SettingsPage/AdvancedPreferences.d.ts +1 -0
- package/pages/SettingsPage/GasPriceSelect.d.ts +1 -0
- package/pages/SettingsPage/SettingsPage.d.ts +1 -0
- package/pages/SettingsPage/SlippageInput.d.ts +1 -0
- package/providers/WalletProvider/WalletProvider.d.ts +5 -0
- package/providers/WalletProvider/WalletProvider.js +12 -6
package/config/sentry.js
CHANGED
|
@@ -10,6 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { version } from './version';
|
|
11
11
|
let sentryLoaded = false;
|
|
12
12
|
export const initSentry = (enabled) => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
+
if (process.env.NODE_ENV === 'development') {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
13
16
|
if (enabled || sentryLoaded) {
|
|
14
17
|
const [Sentry, { CaptureConsole }, { BrowserTracing }] = yield Promise.all([
|
|
15
18
|
import('@sentry/react'),
|
package/config/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@lifi/widget";
|
|
2
|
-
export declare const version = "1.13.
|
|
2
|
+
export declare const version = "1.13.2";
|
package/config/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = '@lifi/widget';
|
|
2
|
-
export const version = '1.13.
|
|
2
|
+
export const version = '1.13.2';
|
package/hooks/useChains.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export declare const useChains: () => {
|
|
|
2
2
|
error: unknown;
|
|
3
3
|
isError: true;
|
|
4
4
|
isLoading: false;
|
|
5
|
-
isLoadingError:
|
|
6
|
-
isRefetchError:
|
|
5
|
+
isLoadingError: false;
|
|
6
|
+
isRefetchError: true;
|
|
7
7
|
isSuccess: false;
|
|
8
8
|
status: "error";
|
|
9
9
|
dataUpdatedAt: number;
|
|
@@ -26,11 +26,11 @@ export declare const useChains: () => {
|
|
|
26
26
|
} | {
|
|
27
27
|
error: null;
|
|
28
28
|
isError: false;
|
|
29
|
-
isLoading:
|
|
29
|
+
isLoading: false;
|
|
30
30
|
isLoadingError: false;
|
|
31
31
|
isRefetchError: false;
|
|
32
|
-
isSuccess:
|
|
33
|
-
status: "
|
|
32
|
+
isSuccess: true;
|
|
33
|
+
status: "success";
|
|
34
34
|
dataUpdatedAt: number;
|
|
35
35
|
errorUpdatedAt: number;
|
|
36
36
|
failureCount: number;
|
|
@@ -52,8 +52,8 @@ export declare const useChains: () => {
|
|
|
52
52
|
error: unknown;
|
|
53
53
|
isError: true;
|
|
54
54
|
isLoading: false;
|
|
55
|
-
isLoadingError:
|
|
56
|
-
isRefetchError:
|
|
55
|
+
isLoadingError: true;
|
|
56
|
+
isRefetchError: false;
|
|
57
57
|
isSuccess: false;
|
|
58
58
|
status: "error";
|
|
59
59
|
dataUpdatedAt: number;
|
|
@@ -76,11 +76,11 @@ export declare const useChains: () => {
|
|
|
76
76
|
} | {
|
|
77
77
|
error: null;
|
|
78
78
|
isError: false;
|
|
79
|
-
isLoading:
|
|
79
|
+
isLoading: true;
|
|
80
80
|
isLoadingError: false;
|
|
81
81
|
isRefetchError: false;
|
|
82
|
-
isSuccess:
|
|
83
|
-
status: "
|
|
82
|
+
isSuccess: false;
|
|
83
|
+
status: "loading";
|
|
84
84
|
dataUpdatedAt: number;
|
|
85
85
|
errorUpdatedAt: number;
|
|
86
86
|
failureCount: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/widget",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2",
|
|
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",
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
"@ethersproject/experimental": "^5.6.3",
|
|
43
43
|
"@ethersproject/providers": "^5.6.8",
|
|
44
44
|
"@lifi/sdk": "^1.1.3",
|
|
45
|
-
"@lifi/wallet-management": "^1.1.
|
|
45
|
+
"@lifi/wallet-management": "^1.1.4",
|
|
46
46
|
"@mui/icons-material": "^5.8.4",
|
|
47
|
-
"@mui/lab": "^5.0.0-alpha.
|
|
48
|
-
"@mui/material": "^5.10.
|
|
47
|
+
"@mui/lab": "^5.0.0-alpha.95",
|
|
48
|
+
"@mui/material": "^5.10.1",
|
|
49
49
|
"@sentry/integrations": "^7.10.0",
|
|
50
50
|
"@sentry/react": "^7.10.0",
|
|
51
51
|
"@sentry/tracing": "^7.10.0",
|
|
52
|
-
"@tanstack/react-query": "^4.
|
|
52
|
+
"@tanstack/react-query": "^4.1.3",
|
|
53
53
|
"@tanstack/react-virtual": "^3.0.0-beta.17",
|
|
54
54
|
"big.js": "^6.2.1",
|
|
55
|
-
"i18next": "^21.9.
|
|
55
|
+
"i18next": "^21.9.1",
|
|
56
56
|
"immer": "^9.0.15",
|
|
57
57
|
"react": "^18.2.0",
|
|
58
58
|
"react-dom": "^18.2.0",
|
|
59
|
-
"react-hook-form": "^7.34.
|
|
60
|
-
"react-i18next": "^11.18.
|
|
59
|
+
"react-hook-form": "^7.34.2",
|
|
60
|
+
"react-i18next": "^11.18.4",
|
|
61
61
|
"react-router-dom": "^6.3.0",
|
|
62
62
|
"react-timer-hook": "^3.0.5",
|
|
63
63
|
"zustand": "^4.0.0"
|
|
@@ -43,7 +43,7 @@ export const SelectWalletPage = () => {
|
|
|
43
43
|
return (_jsxs(Container, Object.assign({ disableGutters: true }, { children: [_jsx(List, Object.assign({ sx: {
|
|
44
44
|
paddingLeft: 2,
|
|
45
45
|
paddingRight: 2,
|
|
46
|
-
} }, { children: supportedWallets.map((wallet) => (_jsxs(WalletListItemButton, Object.assign({ onClick: (event) => handleConnect(event, wallet), disableRipple: true }, { children: [_jsx(ListItemAvatar, { children: _jsx(Avatar, Object.assign({ src: wallet.icon, alt: wallet.name }, { children: wallet.name[0] })) }), _jsx(WalletListItemText, { primary: wallet.name })] }), wallet.name))) })), _jsxs(Dialog, Object.assign({ open: walletIdentity.show, onClose: closeDialog }, { children: [_jsx(DialogContent, { children: _jsx(DialogContentText, { children: t('wallet.extensionNotFound', {
|
|
46
|
+
} }, { children: supportedWallets.map((wallet) => (_jsxs(WalletListItemButton, Object.assign({ onClick: (event) => handleConnect(event, wallet), disableRipple: true }, { children: [_jsx(ListItemAvatar, { children: _jsx(Avatar, Object.assign({ src: wallet.icon.src || wallet.icon, alt: wallet.name }, { children: wallet.name[0] })) }), _jsx(WalletListItemText, { primary: wallet.name })] }), wallet.name))) })), _jsxs(Dialog, Object.assign({ open: walletIdentity.show, onClose: closeDialog }, { children: [_jsx(DialogContent, { children: _jsx(DialogContentText, { children: t('wallet.extensionNotFound', {
|
|
47
47
|
name: (_a = walletIdentity.wallet) === null || _a === void 0 ? void 0 : _a.name,
|
|
48
48
|
}) }) }), _jsx(DialogActions, { children: _jsx(Button, Object.assign({ onClick: closeDialog, autoFocus: true }, { children: t('button.ok') })) })] }))] })));
|
|
49
49
|
};
|
|
@@ -11,4 +11,9 @@ export declare const extractAccountFromSigner: (signer?: Signer) => Promise<{
|
|
|
11
11
|
isActive: boolean;
|
|
12
12
|
signer: Signer | undefined;
|
|
13
13
|
chainId: number | undefined;
|
|
14
|
+
} | {
|
|
15
|
+
address?: undefined;
|
|
16
|
+
isActive?: undefined;
|
|
17
|
+
signer?: undefined;
|
|
18
|
+
chainId?: undefined;
|
|
14
19
|
}>;
|
|
@@ -85,10 +85,16 @@ export const WalletProvider = ({ children, walletManagement }) => {
|
|
|
85
85
|
return (_jsx(WalletContext.Provider, Object.assign({ value: value }, { children: children })));
|
|
86
86
|
};
|
|
87
87
|
export const extractAccountFromSigner = (signer) => __awaiter(void 0, void 0, void 0, function* () {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
try {
|
|
89
|
+
return {
|
|
90
|
+
address: (yield (signer === null || signer === void 0 ? void 0 : signer.getAddress())) || undefined,
|
|
91
|
+
isActive: (signer && !!(yield signer.getAddress()) === null) || !!signer,
|
|
92
|
+
signer,
|
|
93
|
+
chainId: (yield (signer === null || signer === void 0 ? void 0 : signer.getChainId())) || undefined,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.log(error);
|
|
98
|
+
return {};
|
|
99
|
+
}
|
|
94
100
|
});
|