@lifi/widget 1.1.0 → 1.1.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.
Files changed (65) hide show
  1. package/AppDrawer.d.ts +1 -1
  2. package/AppProvider.d.ts +1 -1
  3. package/AppProvider.js +7 -2
  4. package/components/Header/Header.js +1 -1
  5. package/components/Header/NavigationHeader.js +5 -3
  6. package/components/Header/WalletHeader.js +1 -1
  7. package/config/env.d.ts +0 -9
  8. package/config/env.js +1 -17
  9. package/fonts/Inter-Black.woff +0 -0
  10. package/fonts/Inter-Black.woff2 +0 -0
  11. package/fonts/Inter-BlackItalic.woff +0 -0
  12. package/fonts/Inter-BlackItalic.woff2 +0 -0
  13. package/fonts/Inter-Bold.woff +0 -0
  14. package/fonts/Inter-Bold.woff2 +0 -0
  15. package/fonts/Inter-BoldItalic.woff +0 -0
  16. package/fonts/Inter-BoldItalic.woff2 +0 -0
  17. package/fonts/Inter-ExtraBold.woff +0 -0
  18. package/fonts/Inter-ExtraBold.woff2 +0 -0
  19. package/fonts/Inter-ExtraBoldItalic.woff +0 -0
  20. package/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
  21. package/fonts/Inter-ExtraLight.woff +0 -0
  22. package/fonts/Inter-ExtraLight.woff2 +0 -0
  23. package/fonts/Inter-ExtraLightItalic.woff +0 -0
  24. package/fonts/Inter-ExtraLightItalic.woff2 +0 -0
  25. package/fonts/Inter-Italic.woff +0 -0
  26. package/fonts/Inter-Italic.woff2 +0 -0
  27. package/fonts/Inter-Light.woff +0 -0
  28. package/fonts/Inter-Light.woff2 +0 -0
  29. package/fonts/Inter-LightItalic.woff +0 -0
  30. package/fonts/Inter-LightItalic.woff2 +0 -0
  31. package/fonts/Inter-Medium.woff +0 -0
  32. package/fonts/Inter-Medium.woff2 +0 -0
  33. package/fonts/Inter-MediumItalic.woff +0 -0
  34. package/fonts/Inter-MediumItalic.woff2 +0 -0
  35. package/fonts/Inter-Regular.woff +0 -0
  36. package/fonts/Inter-Regular.woff2 +0 -0
  37. package/fonts/Inter-SemiBold.woff +0 -0
  38. package/fonts/Inter-SemiBold.woff2 +0 -0
  39. package/fonts/Inter-SemiBoldItalic.woff +0 -0
  40. package/fonts/Inter-SemiBoldItalic.woff2 +0 -0
  41. package/fonts/Inter-Thin.woff +0 -0
  42. package/fonts/Inter-Thin.woff2 +0 -0
  43. package/fonts/Inter-ThinItalic.woff +0 -0
  44. package/fonts/Inter-ThinItalic.woff2 +0 -0
  45. package/fonts/Inter-italic.var.woff2 +0 -0
  46. package/fonts/Inter-roman.var.woff2 +0 -0
  47. package/fonts/Inter.var.woff2 +0 -0
  48. package/fonts/inter.css +200 -0
  49. package/hooks/useChains.js +2 -2
  50. package/hooks/useContentHeight.js +18 -10
  51. package/i18n/en/translation.json +136 -136
  52. package/icons/LiFiFullLogo.svg +10 -0
  53. package/icons/LiFiLogo.svg +5 -0
  54. package/lifi.js +1 -4
  55. package/package.json +3 -2
  56. package/pages/SelectTokenPage/ChainSelect.js +1 -1
  57. package/providers/WidgetProvider/WidgetProvider.js +4 -6
  58. package/providers/WidgetProvider/types.d.ts +1 -1
  59. package/types/widget.d.ts +1 -1
  60. package/utils/routes.d.ts +1 -0
  61. package/utils/routes.js +7 -6
  62. package/config/rpcs.d.ts +0 -1
  63. package/config/rpcs.js +0 -20
  64. package/i18n/react-i18next.d.ts +0 -9
  65. package/react-app-env.d.ts +0 -1
package/AppDrawer.d.ts CHANGED
@@ -3,7 +3,7 @@ import { RefObject } from 'react';
3
3
  import { WidgetConfig } from './types';
4
4
  export declare type AppDrawerProps = DrawerProps & {
5
5
  elementRef?: RefObject<HTMLDivElement>;
6
- config: WidgetConfig;
6
+ config?: WidgetConfig;
7
7
  };
8
8
  export interface AppDrawerBase {
9
9
  isOpen(): void;
package/AppProvider.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { WidgetConfig } from '.';
3
3
  export interface AppProps {
4
- config: WidgetConfig;
4
+ config?: WidgetConfig;
5
5
  }
6
6
  export declare const AppProvider: React.FC<PropsWithChildren<AppProps>>;
package/AppProvider.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ /* eslint-disable camelcase */
3
+ /* eslint-disable react/jsx-pascal-case */
4
+ import { Fragment } from 'react';
2
5
  import { QueryClientProvider } from 'react-query';
3
- import { MemoryRouter } from 'react-router-dom';
6
+ import { MemoryRouter, useInRouterContext } from 'react-router-dom';
4
7
  import { queryClient } from './config/queryClient';
5
8
  import { SwapFormProvider } from './providers/SwapFormProvider';
6
9
  import { ThemeProvider } from './providers/ThemeProvider';
@@ -8,5 +11,7 @@ import { WalletProvider } from './providers/WalletProvider';
8
11
  import { WidgetProvider } from './providers/WidgetProvider';
9
12
  const QueryProvider = QueryClientProvider;
10
13
  export const AppProvider = ({ children, config, }) => {
11
- return (_jsx(WidgetProvider, Object.assign({ config: config }, { children: _jsx(ThemeProvider, { children: _jsx(QueryProvider, Object.assign({ client: queryClient }, { children: _jsx(MemoryRouter, { children: _jsx(WalletProvider, { children: _jsx(SwapFormProvider, { children: children }) }) }) })) }) })));
14
+ const inRouterContext = useInRouterContext();
15
+ const Router = inRouterContext ? Fragment : MemoryRouter;
16
+ return (_jsx(WidgetProvider, Object.assign({ config: config }, { children: _jsx(ThemeProvider, { children: _jsx(QueryProvider, Object.assign({ client: queryClient }, { children: _jsx(Router, { children: _jsx(WalletProvider, { children: _jsx(SwapFormProvider, { children: children }) }) }) })) }) })));
12
17
  };
@@ -12,6 +12,6 @@ const stickyHeaderRoutes = [
12
12
  ];
13
13
  const HeaderContainer = ({ children }) => {
14
14
  const { pathname } = useLocation();
15
- return (_jsx(Container, Object.assign({ id: ElementId.Header, sticky: stickyHeaderRoutes.includes(pathname) }, { children: children })));
15
+ return (_jsx(Container, Object.assign({ id: ElementId.Header, sticky: stickyHeaderRoutes.some((route) => pathname.includes(route)) }, { children: children })));
16
16
  };
17
17
  export const Header = () => (_jsxs(HeaderContainer, { children: [_jsx(WalletHeader, {}), _jsx(NavigationHeader, {})] }));
@@ -3,7 +3,7 @@ import { ArrowBack as ArrowBackIcon, Settings as SettingsIcon, } from '@mui/icon
3
3
  import { Box, IconButton, Typography } from '@mui/material';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { Route, Routes, useLocation, useNavigate } from 'react-router-dom';
6
- import { routes } from '../../utils/routes';
6
+ import { routes, routesValues } from '../../utils/routes';
7
7
  import { SwapRoutesUpdateProgress } from '../SwapRoutes/SwapRoutesUpdateProgress';
8
8
  import { HeaderAppBar } from './Header.style';
9
9
  const backButtonRoutes = [
@@ -17,6 +17,8 @@ const backButtonRoutes = [
17
17
  export const NavigationHeader = () => {
18
18
  const { t } = useTranslation();
19
19
  const { pathname } = useLocation();
20
+ const path = pathname.substring(pathname.lastIndexOf('/') + 1);
21
+ const hasPath = routesValues.includes(path);
20
22
  const navigate = useNavigate();
21
23
  const handleSettings = () => {
22
24
  navigate(routes.settings);
@@ -25,7 +27,7 @@ export const NavigationHeader = () => {
25
27
  navigate(-1);
26
28
  };
27
29
  const handleHeaderTitle = () => {
28
- switch (pathname) {
30
+ switch (path) {
29
31
  case routes.selectWallet:
30
32
  return t(`header.selectWallet`);
31
33
  case routes.settings:
@@ -42,5 +44,5 @@ export const NavigationHeader = () => {
42
44
  return t(`header.swap`);
43
45
  }
44
46
  };
45
- return (_jsxs(HeaderAppBar, Object.assign({ elevation: 0 }, { children: [backButtonRoutes.includes(pathname) ? (_jsx(IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "start", onClick: handleBack }, { children: _jsx(ArrowBackIcon, {}) }))) : null, _jsx(Typography, Object.assign({ fontSize: pathname === '/' ? 32 : 24, align: pathname === '/' ? 'left' : 'center', fontWeight: "700", flex: 1, noWrap: true }, { children: handleHeaderTitle() })), _jsxs(Routes, { children: [_jsx(Route, { path: routes.swapRoutes, element: _jsx(SwapRoutesUpdateProgress, { size: "medium", edge: "end", sx: { marginRight: -1 } }) }), _jsx(Route, { path: routes.home, element: _jsx(IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "end", onClick: handleSettings }, { children: _jsx(SettingsIcon, {}) })) }), _jsx(Route, { path: "/:empty", element: _jsx(Box, { width: 36, height: 48 }) })] })] })));
47
+ return (_jsxs(HeaderAppBar, Object.assign({ elevation: 0 }, { children: [backButtonRoutes.includes(path) ? (_jsx(IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "start", onClick: handleBack }, { children: _jsx(ArrowBackIcon, {}) }))) : null, _jsx(Typography, Object.assign({ fontSize: hasPath ? 24 : 32, align: hasPath ? 'center' : 'left', fontWeight: "700", flex: 1, noWrap: true }, { children: handleHeaderTitle() })), _jsxs(Routes, { children: [_jsx(Route, { path: routes.swapRoutes, element: _jsx(SwapRoutesUpdateProgress, { size: "medium", edge: "end", sx: { marginRight: -1 } }) }), _jsx(Route, { path: routes.home, element: _jsx(IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "end", onClick: handleSettings }, { children: _jsx(SettingsIcon, {}) })) }), _jsx(Route, { path: "/:empty", element: _jsx(Box, { width: 28, height: 48 }) })] })] })));
46
48
  };
@@ -24,5 +24,5 @@ const ConnectButton = () => {
24
24
  const connect = () => {
25
25
  navigate(routes.selectWallet);
26
26
  };
27
- return (_jsx(IconButton, Object.assign({ size: "medium", "aria-label": "disconnect", edge: "end", onClick: pathname !== routes.selectWallet ? connect : undefined }, { children: _jsx(AccountBalanceWalletIcon, {}) })));
27
+ return (_jsx(IconButton, Object.assign({ size: "medium", "aria-label": "disconnect", edge: "end", onClick: !pathname.includes(routes.selectWallet) ? connect : undefined }, { children: _jsx(AccountBalanceWalletIcon, {}) })));
28
28
  };
package/config/env.d.ts CHANGED
@@ -1,12 +1,3 @@
1
1
  export declare const env: {
2
2
  LIFI_API_URL: string;
3
- LIFI_RPC_URL_MAINNET: string;
4
- LIFI_RPC_URL_ROPSTEN: string;
5
- LIFI_RPC_URL_RINKEBY: string;
6
- LIFI_RPC_URL_GORLI: string;
7
- LIFI_RPC_URL_KOVAN: string;
8
- LIFI_RPC_URL_ARBITRUM_RINKEBY: string;
9
- LIFI_RPC_URL_OPTIMISM_KOVAN: string;
10
- LIFI_RPC_URL_POLYGON_MUMBAI: string;
11
- LIFI_RPC_URL_BSC_TESTNET: string;
12
3
  };
package/config/env.js CHANGED
@@ -1,19 +1,3 @@
1
1
  export const env = {
2
- LIFI_API_URL: 'https://li.quest/v1/',
3
- // RPC - Mainnet (overwrites)
4
- LIFI_RPC_URL_MAINNET: 'https://speedy-nodes-nyc.moralis.io/5ed6053dc39eba789ff466c9/eth/mainnet',
5
- // LIFI_RPC_URL_POLYGON:
6
- // LIFI_RPC_URL_BSC:
7
- // LIFI_RPC_URL_XDAI:
8
- // LIFI_RPC_URL_FANTOM:
9
- // LIFI_RPC_URL_ARBITRUM:
10
- // RPC - Testnet (overwrites)
11
- LIFI_RPC_URL_ROPSTEN: 'https://ropsten.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930',
12
- LIFI_RPC_URL_RINKEBY: 'https://rinkeby.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930',
13
- LIFI_RPC_URL_GORLI: 'https://goerli.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930',
14
- LIFI_RPC_URL_KOVAN: 'https://kovan.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930',
15
- LIFI_RPC_URL_ARBITRUM_RINKEBY: 'https://arbitrum-rinkeby.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930',
16
- LIFI_RPC_URL_OPTIMISM_KOVAN: 'https://optimism-kovan.infura.io/v3/c7fe4abb5bbc466cb56038efbb0b9930',
17
- LIFI_RPC_URL_POLYGON_MUMBAI: 'https://rpc-mumbai.maticvigil.com/v1/e4dadaac060844094a667194c20f79cc9bb0bc59',
18
- LIFI_RPC_URL_BSC_TESTNET: 'https://data-seed-prebsc-1-s2.binance.org:8545',
2
+ LIFI_API_URL: 'https://li.quest/v1/', // 'https://developkub.li.finance/v1/',
19
3
  };
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,200 @@
1
+ @font-face {
2
+ font-family: 'Inter';
3
+ font-style: normal;
4
+ font-weight: 100;
5
+ font-display: swap;
6
+ src: url("Inter-Thin.woff2?v=3.19") format("woff2"),
7
+ url("Inter-Thin.woff?v=3.19") format("woff");
8
+ }
9
+ @font-face {
10
+ font-family: 'Inter';
11
+ font-style: italic;
12
+ font-weight: 100;
13
+ font-display: swap;
14
+ src: url("Inter-ThinItalic.woff2?v=3.19") format("woff2"),
15
+ url("Inter-ThinItalic.woff?v=3.19") format("woff");
16
+ }
17
+
18
+ @font-face {
19
+ font-family: 'Inter';
20
+ font-style: normal;
21
+ font-weight: 200;
22
+ font-display: swap;
23
+ src: url("Inter-ExtraLight.woff2?v=3.19") format("woff2"),
24
+ url("Inter-ExtraLight.woff?v=3.19") format("woff");
25
+ }
26
+ @font-face {
27
+ font-family: 'Inter';
28
+ font-style: italic;
29
+ font-weight: 200;
30
+ font-display: swap;
31
+ src: url("Inter-ExtraLightItalic.woff2?v=3.19") format("woff2"),
32
+ url("Inter-ExtraLightItalic.woff?v=3.19") format("woff");
33
+ }
34
+
35
+ @font-face {
36
+ font-family: 'Inter';
37
+ font-style: normal;
38
+ font-weight: 300;
39
+ font-display: swap;
40
+ src: url("Inter-Light.woff2?v=3.19") format("woff2"),
41
+ url("Inter-Light.woff?v=3.19") format("woff");
42
+ }
43
+ @font-face {
44
+ font-family: 'Inter';
45
+ font-style: italic;
46
+ font-weight: 300;
47
+ font-display: swap;
48
+ src: url("Inter-LightItalic.woff2?v=3.19") format("woff2"),
49
+ url("Inter-LightItalic.woff?v=3.19") format("woff");
50
+ }
51
+
52
+ @font-face {
53
+ font-family: 'Inter';
54
+ font-style: normal;
55
+ font-weight: 400;
56
+ font-display: swap;
57
+ src: url("Inter-Regular.woff2?v=3.19") format("woff2"),
58
+ url("Inter-Regular.woff?v=3.19") format("woff");
59
+ }
60
+ @font-face {
61
+ font-family: 'Inter';
62
+ font-style: italic;
63
+ font-weight: 400;
64
+ font-display: swap;
65
+ src: url("Inter-Italic.woff2?v=3.19") format("woff2"),
66
+ url("Inter-Italic.woff?v=3.19") format("woff");
67
+ }
68
+
69
+ @font-face {
70
+ font-family: 'Inter';
71
+ font-style: normal;
72
+ font-weight: 500;
73
+ font-display: swap;
74
+ src: url("Inter-Medium.woff2?v=3.19") format("woff2"),
75
+ url("Inter-Medium.woff?v=3.19") format("woff");
76
+ }
77
+ @font-face {
78
+ font-family: 'Inter';
79
+ font-style: italic;
80
+ font-weight: 500;
81
+ font-display: swap;
82
+ src: url("Inter-MediumItalic.woff2?v=3.19") format("woff2"),
83
+ url("Inter-MediumItalic.woff?v=3.19") format("woff");
84
+ }
85
+
86
+ @font-face {
87
+ font-family: 'Inter';
88
+ font-style: normal;
89
+ font-weight: 600;
90
+ font-display: swap;
91
+ src: url("Inter-SemiBold.woff2?v=3.19") format("woff2"),
92
+ url("Inter-SemiBold.woff?v=3.19") format("woff");
93
+ }
94
+ @font-face {
95
+ font-family: 'Inter';
96
+ font-style: italic;
97
+ font-weight: 600;
98
+ font-display: swap;
99
+ src: url("Inter-SemiBoldItalic.woff2?v=3.19") format("woff2"),
100
+ url("Inter-SemiBoldItalic.woff?v=3.19") format("woff");
101
+ }
102
+
103
+ @font-face {
104
+ font-family: 'Inter';
105
+ font-style: normal;
106
+ font-weight: 700;
107
+ font-display: swap;
108
+ src: url("Inter-Bold.woff2?v=3.19") format("woff2"),
109
+ url("Inter-Bold.woff?v=3.19") format("woff");
110
+ }
111
+ @font-face {
112
+ font-family: 'Inter';
113
+ font-style: italic;
114
+ font-weight: 700;
115
+ font-display: swap;
116
+ src: url("Inter-BoldItalic.woff2?v=3.19") format("woff2"),
117
+ url("Inter-BoldItalic.woff?v=3.19") format("woff");
118
+ }
119
+
120
+ @font-face {
121
+ font-family: 'Inter';
122
+ font-style: normal;
123
+ font-weight: 800;
124
+ font-display: swap;
125
+ src: url("Inter-ExtraBold.woff2?v=3.19") format("woff2"),
126
+ url("Inter-ExtraBold.woff?v=3.19") format("woff");
127
+ }
128
+ @font-face {
129
+ font-family: 'Inter';
130
+ font-style: italic;
131
+ font-weight: 800;
132
+ font-display: swap;
133
+ src: url("Inter-ExtraBoldItalic.woff2?v=3.19") format("woff2"),
134
+ url("Inter-ExtraBoldItalic.woff?v=3.19") format("woff");
135
+ }
136
+
137
+ @font-face {
138
+ font-family: 'Inter';
139
+ font-style: normal;
140
+ font-weight: 900;
141
+ font-display: swap;
142
+ src: url("Inter-Black.woff2?v=3.19") format("woff2"),
143
+ url("Inter-Black.woff?v=3.19") format("woff");
144
+ }
145
+ @font-face {
146
+ font-family: 'Inter';
147
+ font-style: italic;
148
+ font-weight: 900;
149
+ font-display: swap;
150
+ src: url("Inter-BlackItalic.woff2?v=3.19") format("woff2"),
151
+ url("Inter-BlackItalic.woff?v=3.19") format("woff");
152
+ }
153
+
154
+ /* -------------------------------------------------------
155
+ Variable font.
156
+ Usage:
157
+
158
+ html { font-family: 'Inter', sans-serif; }
159
+ @supports (font-variation-settings: normal) {
160
+ html { font-family: 'Inter var', sans-serif; }
161
+ }
162
+ */
163
+ @font-face {
164
+ font-family: 'Inter var';
165
+ font-weight: 100 900;
166
+ font-display: swap;
167
+ font-style: normal;
168
+ font-named-instance: 'Regular';
169
+ src: url("Inter-roman.var.woff2?v=3.19") format("woff2");
170
+ }
171
+ @font-face {
172
+ font-family: 'Inter var';
173
+ font-weight: 100 900;
174
+ font-display: swap;
175
+ font-style: italic;
176
+ font-named-instance: 'Italic';
177
+ src: url("Inter-italic.var.woff2?v=3.19") format("woff2");
178
+ }
179
+
180
+
181
+ /* --------------------------------------------------------------------------
182
+ [EXPERIMENTAL] Multi-axis, single variable font.
183
+
184
+ Slant axis is not yet widely supported (as of February 2019) and thus this
185
+ multi-axis single variable font is opt-in rather than the default.
186
+
187
+ When using this, you will probably need to set font-variation-settings
188
+ explicitly, e.g.
189
+
190
+ * { font-variation-settings: "slnt" 0deg }
191
+ .italic { font-variation-settings: "slnt" 10deg }
192
+
193
+ */
194
+ @font-face {
195
+ font-family: 'Inter var experimental';
196
+ font-weight: 100 900;
197
+ font-display: swap;
198
+ font-style: oblique 0deg 10deg;
199
+ src: url("Inter.var.woff2?v=3.19") format("woff2");
200
+ }
@@ -23,10 +23,10 @@ import { useQuery } from 'react-query';
23
23
  import { LiFi } from '../lifi';
24
24
  import { useWidgetConfig } from '../providers/WidgetProvider';
25
25
  export const useChains = () => {
26
- const { enabledChains } = useWidgetConfig();
26
+ const { disabledChains } = useWidgetConfig();
27
27
  const _a = useQuery(['chains'], () => __awaiter(void 0, void 0, void 0, function* () {
28
28
  const chains = yield LiFi.getChains();
29
- return chains.filter((chain) => enabledChains.includes(chain.id));
29
+ return chains.filter((chain) => !(disabledChains === null || disabledChains === void 0 ? void 0 : disabledChains.includes(chain.id)));
30
30
  })), { data } = _a, other = __rest(_a, ["data"]);
31
31
  const getChainById = useCallback((chainId) => {
32
32
  const chain = data === null || data === void 0 ? void 0 : data.find((chain) => chain.id === chainId);
@@ -1,15 +1,23 @@
1
- import { useState } from 'react';
1
+ import { useLayoutEffect, useState } from 'react';
2
2
  import { ElementId } from '../utils/elements';
3
+ const getContentHeight = () => {
4
+ const headerElement = document.getElementById(ElementId.Header);
5
+ const containerElement = document.getElementById(ElementId.ScrollableContainer);
6
+ if (!containerElement || !headerElement) {
7
+ console.warn(`Can't find ${ElementId.ScrollableContainer} or ${ElementId.Header} id.`);
8
+ return 0;
9
+ }
10
+ const { height: containerHeight } = containerElement.getBoundingClientRect();
11
+ const { height: headerHeight } = headerElement.getBoundingClientRect();
12
+ return containerHeight - headerHeight;
13
+ };
3
14
  export const useContentHeight = () => {
4
- const [contentHeight] = useState(() => {
5
- const headerElement = document.getElementById(ElementId.Header);
6
- const containerElement = document.getElementById(ElementId.ScrollableContainer);
7
- if (!containerElement || !headerElement) {
8
- throw Error(`Can't find ${ElementId.ScrollableContainer} or ${ElementId.Header} id.`);
15
+ const [contentHeight, setContentHeight] = useState(getContentHeight);
16
+ useLayoutEffect(() => {
17
+ if (!contentHeight) {
18
+ setContentHeight(getContentHeight());
9
19
  }
10
- const { height: containerHeight } = containerElement.getBoundingClientRect();
11
- const { height: headerHeight } = headerElement.getBoundingClientRect();
12
- return containerHeight - headerHeight;
13
- });
20
+ // eslint-disable-next-line react-hooks/exhaustive-deps
21
+ }, []);
14
22
  return contentHeight;
15
23
  };
@@ -1,142 +1,142 @@
1
1
  {
2
- "header": {
3
- "walletConnected": "Wallet connected",
4
- "connectWallet": "Connect wallet",
5
- "selectWallet": "Select your wallet",
6
- "swap": "Swap",
7
- "from": "Swap from",
8
- "to": "Swap to",
9
- "settings": "Settings",
10
- "routes": "You get"
2
+ "header": {
3
+ "walletConnected": "Wallet connected",
4
+ "connectWallet": "Connect wallet",
5
+ "selectWallet": "Select your wallet",
6
+ "swap": "Swap",
7
+ "from": "Swap from",
8
+ "to": "Swap to",
9
+ "settings": "Settings",
10
+ "routes": "You get"
11
+ },
12
+ "button": {
13
+ "swap": "Swap",
14
+ "connectWallet": "Connect wallet",
15
+ "switchChain": "Switch chain",
16
+ "startSwap": "Start the swap",
17
+ "restartSwap": "Restart swap",
18
+ "removeSwap": "Remove swap",
19
+ "done": "Done",
20
+ "okay": "Okay",
21
+ "seeDetails": "See details",
22
+ "tryAgain": "Try again",
23
+ "light": "Light",
24
+ "dark": "Dark",
25
+ "auto": "Auto",
26
+ "ok": "Ok",
27
+ "hide": "Hide",
28
+ "max": "max",
29
+ "lifiSwap": "LI.FI Swap"
30
+ },
31
+ "swap": {
32
+ "from": "From",
33
+ "to": "To",
34
+ "amount": "You pay",
35
+ "maxAmount": "/ {{amount}}",
36
+ "routes": "You get",
37
+ "approximateCurrency": "\u2248 {{value, currency(currency: USD)}}",
38
+ "currency": "{{value, currency(currency: USD)}}",
39
+ "sendToRecipient": "Send to recipient",
40
+ "recipientsAddress": "Recipient's {{chain}} address",
41
+ "addressConfirmation": "I confirm that the address above is correct",
42
+ "gas": "gas fee",
43
+ "minutes": "minutes",
44
+ "tokenSearch": "Search your token",
45
+ "selectChain": "Chain",
46
+ "selectToken": "Token",
47
+ "selectChainAndToken": "Select chain and token",
48
+ "inProgress": "In progress",
49
+ "couldntFindTokens": "We couldn't find tokens on this chain or you don't have any.",
50
+ "insufficientFunds": "Insufficient funds",
51
+ "insufficientGasOnStartChain": "Insufficient gas on start chain",
52
+ "insufficientGasOnDestinationChain": "Insufficient gas on destination chain",
53
+ "insufficientGasOnDestinationChainTooltip": "The selected route requires a swap on the chain you are transferring to. You need to have gas on that chain to pay for the transaction there.",
54
+ "stepSwap": "Swap",
55
+ "stepBridge": "Bridge",
56
+ "stepSwapAndBridge": "Swap and bridge",
57
+ "estimatedTime": "~{{value}} min.",
58
+ "networkIsBusy": "Network is busy...",
59
+ "crossStepDetails": "Bridge {{from}} to {{to}} via {{tool}}",
60
+ "swapStepDetails": "Swap on {{value}}",
61
+ "tags": {
62
+ "recommended": "Recommended",
63
+ "fastest": "Fast",
64
+ "cheapest": "Cheap",
65
+ "safest": "Safe",
66
+ "general": "General"
11
67
  },
12
- "button": {
13
- "swap": "Swap",
14
- "connectWallet": "Connect wallet",
15
- "switchChain": "Switch chain",
16
- "startSwap": "Start the swap",
17
- "restartSwap": "Restart swap",
18
- "removeSwap": "Remove swap",
19
- "done": "Done",
20
- "okay": "Okay",
21
- "seeDetails": "See details",
22
- "tryAgain": "Try again",
23
- "light": "Light",
24
- "dark": "Dark",
25
- "auto": "Auto",
26
- "ok": "Ok",
27
- "hide": "Hide",
28
- "max": "max",
29
- "lifiSwap": "LI.FI Swap"
68
+ "success": {
69
+ "title": {
70
+ "fundsReceived": "Funds received"
71
+ },
72
+ "message": {
73
+ "fundsReceived": "You now have {{amount}} {{tokenSymbol}} in your wallet on {{chainName}} chain."
74
+ }
30
75
  },
31
- "swap": {
32
- "from": "From",
33
- "to": "To",
34
- "amount": "You pay",
35
- "maxAmount": "/ {{amount}}",
36
- "routes": "You get",
37
- "approximateCurrency": "\u2248 {{value, currency(currency: USD)}}",
38
- "currency": "{{value, currency(currency: USD)}}",
39
- "sendToRecipient": "Send to recipient",
40
- "recipientsAddress": "Recipient's {{chain}} address",
41
- "addressConfirmation": "I confirm that the address above is correct",
42
- "gas": "gas fee",
43
- "minutes": "minutes",
44
- "tokenSearch": "Search your token",
45
- "selectChain": "Chain",
46
- "selectToken": "Token",
47
- "selectChainAndToken": "Select chain and token",
48
- "inProgress": "In progress",
49
- "couldntFindTokens": "We couldn't find tokens on this chain or you don't have any.",
50
- "insufficientFunds": "Insufficient funds",
51
- "insufficientGasOnStartChain": "Insufficient gas on start chain",
52
- "insufficientGasOnDestinationChain": "Insufficient gas on destination chain",
53
- "insufficientGasOnDestinationChainTooltip": "The selected route requires a swap on the chain you are transferring to. You need to have gas on that chain to pay for the transaction there.",
54
- "stepSwap": "Swap",
55
- "stepBridge": "Bridge",
56
- "stepSwapAndBridge": "Swap and bridge",
57
- "estimatedTime": "~{{value}} min.",
58
- "networkIsBusy": "Network is busy...",
59
- "crossStepDetails": "Bridge {{from}} to {{to}} via {{tool}}",
60
- "swapStepDetails": "Swap on {{value}}",
61
- "tags": {
62
- "recommended": "Recommended",
63
- "fastest": "Fast",
64
- "cheapest": "Cheap",
65
- "safest": "Safe",
66
- "general": "General"
67
- },
68
- "success": {
69
- "title": {
70
- "fundsReceived": "Funds received"
71
- },
72
- "message": {
73
- "fundsReceived": "You now have {{amount}} {{tokenSymbol}} in your wallet on {{chainName}} chain."
74
- }
75
- },
76
- "error": {
77
- "title": {
78
- "chainSwitch": "Chain switch required.",
79
- "transactionFailed": "Transaction has failed.",
80
- "transactionUnderpriced": "Transaction is underpriced.",
81
- "transactionUnprepared": "Unable to prepare transaction.",
82
- "unknown": "Something went wrong.",
83
- "userRejectedSignatureRequest": "Signature required."
84
- },
85
- "message": {
86
- "signatureRequired": "Your signature is required to complete the transaction. {{amount}} {{tokenSymbol}} on {{chainName}} remain in your wallet.",
87
- "transactionFailed": "Please check the block explorer for more information.",
88
- "transactionNotSent": "Transaction was not sent, your funds are still in your wallet ({{amount}} {{tokenSymbol}} on {{chainName}})."
89
- }
90
- },
91
- "process": {
92
- "tokenAllowance": {
93
- "started": "Setting token allowance.",
94
- "pending": "Waiting for token allowance approval.",
95
- "done": "Token allowance approved."
96
- },
97
- "switchChain": {
98
- "pending": "Chain switch required.",
99
- "done": "Chain switched successfully."
100
- },
101
- "swap": {
102
- "started": "Preparing swap.",
103
- "actionRequired": "Please sign the transaction.",
104
- "pending": "Swapping.",
105
- "done": "Swap completed."
106
- },
107
- "crossChain": {
108
- "started": "Preparing transaction.",
109
- "actionRequired": "Please sign the transaction.",
110
- "pending": "Waiting for transaction.",
111
- "done": "Transaction approved."
112
- },
113
- "receivingChain": {
114
- "pending": "Waiting for receiving chain.",
115
- "done": "Funds received."
116
- }
117
- }
76
+ "error": {
77
+ "title": {
78
+ "chainSwitch": "Chain switch required.",
79
+ "transactionFailed": "Transaction has failed.",
80
+ "transactionUnderpriced": "Transaction is underpriced.",
81
+ "transactionUnprepared": "Unable to prepare transaction.",
82
+ "unknown": "Something went wrong.",
83
+ "userRejectedSignatureRequest": "Signature required."
84
+ },
85
+ "message": {
86
+ "signatureRequired": "Your signature is required to complete the transaction. {{amount}} {{tokenSymbol}} on {{chainName}} remain in your wallet.",
87
+ "transactionFailed": "Please check the block explorer for more information.",
88
+ "transactionNotSent": "Transaction was not sent, your funds are still in your wallet ({{amount}} {{tokenSymbol}} on {{chainName}})."
89
+ }
118
90
  },
119
- "settings": {
120
- "routePriority": "Route priority",
121
- "slippage": "Slippage",
122
- "gasPrice": {
123
- "title": "Gas price",
124
- "slow": "Slow",
125
- "normal": "Normal",
126
- "fast": "Fast"
127
- },
128
- "advancedPreferences": "Advanced preferences",
129
- "bridgePrioritization": "Bridge prioritization",
130
- "enabledBridges": "Enabled bridges",
131
- "selectEnabledBridges": "Select enabled bridges",
132
- "enabledExchanges": "Enabled exchanges",
133
- "selectEnabledExchanges": "Select enabled exchanges",
134
- "resetToDefault": "Reset to default"
135
- },
136
- "wallet": {
137
- "extensionNotFound": "Please make sure that only the {{name}} browser extension is active before choosing this wallet."
138
- },
139
- "tooltip": {
140
- "progressToNextUpdate": "Displayed data will auto-refresh after {{value}} seconds. Click this circle to update manually."
91
+ "process": {
92
+ "tokenAllowance": {
93
+ "started": "Setting token allowance.",
94
+ "pending": "Waiting for token allowance approval.",
95
+ "done": "Token allowance approved."
96
+ },
97
+ "switchChain": {
98
+ "pending": "Chain switch required.",
99
+ "done": "Chain switched successfully."
100
+ },
101
+ "swap": {
102
+ "started": "Preparing swap.",
103
+ "actionRequired": "Please sign the transaction.",
104
+ "pending": "Swapping.",
105
+ "done": "Swap completed."
106
+ },
107
+ "crossChain": {
108
+ "started": "Preparing transaction.",
109
+ "actionRequired": "Please sign the transaction.",
110
+ "pending": "Waiting for transaction.",
111
+ "done": "Transaction approved."
112
+ },
113
+ "receivingChain": {
114
+ "pending": "Waiting for receiving chain.",
115
+ "done": "Funds received."
116
+ }
141
117
  }
118
+ },
119
+ "settings": {
120
+ "routePriority": "Route priority",
121
+ "slippage": "Slippage",
122
+ "gasPrice": {
123
+ "title": "Gas price",
124
+ "slow": "Slow",
125
+ "normal": "Normal",
126
+ "fast": "Fast"
127
+ },
128
+ "advancedPreferences": "Advanced preferences",
129
+ "bridgePrioritization": "Bridge prioritization",
130
+ "enabledBridges": "Enabled bridges",
131
+ "selectEnabledBridges": "Select enabled bridges",
132
+ "enabledExchanges": "Enabled exchanges",
133
+ "selectEnabledExchanges": "Select enabled exchanges",
134
+ "resetToDefault": "Reset to default"
135
+ },
136
+ "wallet": {
137
+ "extensionNotFound": "Please make sure that only the {{name}} browser extension is active before choosing this wallet."
138
+ },
139
+ "tooltip": {
140
+ "progressToNextUpdate": "Displayed data will auto-refresh after {{value}} seconds. Click this circle to update manually."
141
+ }
142
142
  }
@@ -0,0 +1,10 @@
1
+ <svg width="84" height="32" viewBox="0 0 84 32" fill="inherit"
2
+ xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M50.6689 20.5714H42.6849V8H39V24H50.6689V20.5714Z" />
4
+ <path d="M53.0717 24H56.7566V8H53.0717V24Z" />
5
+ <path d="M59.5088 24H63.0117V20.48H59.5088V24Z" />
6
+ <path d="M69.4396 17.76H77.1506V14.6057H69.4396V11.2457H77.8103V8H65.7547V24H69.4396V17.76Z" />
7
+ <path d="M80.3151 24H84V8H80.3151V24Z" />
8
+ <path d="M14.6163 21.6947L5.1336 23.89C4.78772 23.9766 4.52832 24.3232 4.52832 24.6698V31.1978C4.52832 31.7467 4.96066 32.0933 5.50829 31.9777L18.7379 28.9159C19.2856 28.8004 19.5162 28.2805 19.2856 27.7894L16.8933 22.8501C16.5186 22.0702 16.8933 21.2614 17.7291 21.0881L26.376 19.0084C26.9813 18.864 27.5001 18.2285 27.5001 17.593V11.5561C27.5001 11.0073 27.0677 10.6318 26.5201 10.7762L14.0398 13.7514C13.2616 13.9247 12.9157 14.6757 13.2616 15.3978L15.4521 19.9327C15.8268 20.7126 15.4521 21.4925 14.6163 21.6947Z" />
9
+ <path d="M8.36225 5.3748L10.841 10.4585C11.1581 11.1229 10.841 11.8161 10.1204 11.9606L5.53762 13.0293C4.96116 13.1737 4.5 13.7514 4.5 14.3291V19.7884C4.5 20.7127 5.24939 21.2904 6.1429 21.0882L10.4087 20.1061C10.9851 19.9906 11.4463 19.384 11.4463 18.8063L11.4751 13.2026C11.4751 12.4227 12.1092 11.6428 12.8586 11.4695L26.8376 8.11886C27.1835 8.03221 27.4429 7.68559 27.4429 7.33897V0.810981C27.4429 0.262168 27.0106 -0.113336 26.4629 0.0310883L8.90988 4.24829C8.36225 4.36383 8.13167 4.88375 8.36225 5.3748Z" />
10
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="inherit"
2
+ xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M14.6163 21.6947L5.1336 23.89C4.78772 23.9766 4.52832 24.3232 4.52832 24.6698V31.1978C4.52832 31.7467 4.96066 32.0933 5.50829 31.9777L18.7379 28.9159C19.2856 28.8004 19.5162 28.2805 19.2856 27.7894L16.8933 22.8501C16.5186 22.0702 16.8933 21.2614 17.7291 21.0881L26.376 19.0084C26.9813 18.864 27.5001 18.2285 27.5001 17.593V11.5561C27.5001 11.0073 27.0677 10.6318 26.5201 10.7762L14.0398 13.7514C13.2616 13.9247 12.9157 14.6757 13.2616 15.3978L15.4521 19.9327C15.8268 20.7126 15.4521 21.4925 14.6163 21.6947Z" />
4
+ <path d="M8.36225 5.3748L10.841 10.4585C11.1581 11.1229 10.841 11.8161 10.1204 11.9606L5.53762 13.0293C4.96116 13.1737 4.5 13.7514 4.5 14.3291V19.7884C4.5 20.7127 5.24939 21.2904 6.1429 21.0882L10.4087 20.1061C10.9851 19.9906 11.4463 19.384 11.4463 18.8063L11.4751 13.2026C11.4751 12.4227 12.1092 11.6428 12.8586 11.4695L26.8376 8.11886C27.1835 8.03221 27.4429 7.68559 27.4429 7.33897V0.810981C27.4429 0.262168 27.0106 -0.113336 26.4629 0.0310883L8.90988 4.24829C8.36225 4.36383 8.13167 4.88375 8.36225 5.3748Z" />
5
+ </svg>
package/lifi.js CHANGED
@@ -1,9 +1,6 @@
1
1
  import LIFI from '@lifinance/sdk';
2
- import { env } from './config/env';
3
- import { getRpcs } from './config/rpcs';
4
2
  export const LiFi = new LIFI({
5
- apiUrl: env.LIFI_API_URL,
6
- rpcs: getRpcs(),
3
+ // apiUrl: env.LIFI_API_URL,
7
4
  defaultRouteOptions: {
8
5
  integrator: 'li.fi',
9
6
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifi/widget",
3
- "version": "1.1.0",
3
+ "version": "1.1.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",
@@ -23,6 +23,7 @@
23
23
  "bugs": {
24
24
  "url": "https://github.com/lifinance/widget/issues"
25
25
  },
26
+ "license": "MIT",
26
27
  "keywords": [
27
28
  "widget",
28
29
  "lifi-widget",
@@ -40,7 +41,7 @@
40
41
  "@emotion/styled": "^11.8.1",
41
42
  "@ethersproject/experimental": "^5.6.2",
42
43
  "@ethersproject/providers": "^5.6.8",
43
- "@lifi/wallet-management": "^1.0.1",
44
+ "@lifi/wallet-management": "^1.0.2",
44
45
  "@lifinance/sdk": "^1.0.0-beta.11",
45
46
  "@mui/icons-material": "^5.8.3",
46
47
  "@mui/lab": "^5.0.0-alpha.85",
@@ -21,5 +21,5 @@ export const ChainSelect = ({ formType }) => {
21
21
  setValue(SwapFormKeyHelper.getTokenKey(formType), '');
22
22
  setValue(SwapFormKeyHelper.getAmountKey(formType), '');
23
23
  };
24
- return !isLoading ? (_jsxs(CardContainer, { children: [_jsx(CardTitle, { children: t(`swap.selectChain`) }), _jsx(FormControl, Object.assign({ fullWidth: true }, { children: _jsx(Select, Object.assign({ labelId: "label", MenuProps: { elevation: 2 }, defaultValue: formType === 'from' ? fromChain : toChain, value: chainId, onChange: handleChain, IconComponent: KeyboardArrowDownIcon }, { children: chains === null || chains === void 0 ? void 0 : chains.map((chain) => (_jsxs(MenuItem, Object.assign({ value: chain.id }, { children: [_jsx(ListItemAvatar, { children: _jsx(Avatar, Object.assign({ src: chain.logoURI, alt: chain.key }, { children: chain.name[0] })) }), chain.name] }), chain.key))) })) }))] })) : (_jsx(Skeleton, { variant: "rectangular", width: "100%", height: 89, sx: { borderRadius: 1 } }));
24
+ return !isLoading ? (_jsxs(CardContainer, { children: [_jsx(CardTitle, { children: t(`swap.selectChain`) }), _jsx(FormControl, Object.assign({ fullWidth: true }, { children: _jsx(Select, Object.assign({ labelId: "label", MenuProps: { elevation: 2 }, defaultValue: formType === 'from' ? fromChain : toChain, value: chainId, onChange: handleChain, IconComponent: KeyboardArrowDownIcon }, { children: chains === null || chains === void 0 ? void 0 : chains.map((chain) => (_jsxs(MenuItem, Object.assign({ value: chain.id }, { children: [_jsx(ListItemAvatar, { children: _jsx(Avatar, Object.assign({ src: chain.logoURI, alt: chain.key }, { children: chain.name[0] })) }), chain.name] }), chain.key))) })) }))] })) : (_jsx(Skeleton, { variant: "rectangular", width: "100%", height: 98, sx: { borderRadius: 1 } }));
25
25
  };
@@ -16,15 +16,13 @@ const stub = () => {
16
16
  throw new Error('You forgot to wrap your component in <WidgetProvider>.');
17
17
  };
18
18
  const initialContext = {
19
- enabledChains: [],
19
+ disabledChains: [],
20
20
  };
21
21
  const WidgetContext = createContext(initialContext);
22
22
  export const useWidgetConfig = () => useContext(WidgetContext);
23
23
  export const WidgetProvider = (_a) => {
24
- var { children } = _a, _b = _a.config, { fromChain, toChain } = _b, other = __rest(_b, ["fromChain", "toChain"]);
24
+ var { children } = _a, _b = _a.config, _c = _b === void 0 ? {} : _b, { fromChain, fromToken, toChain, toToken } = _c, config = __rest(_c, ["fromChain", "fromToken", "toChain", "toToken"]);
25
25
  const value = useMemo(() => {
26
- var _a, _b;
27
- const config = Object.assign({}, other);
28
26
  try {
29
27
  return Object.assign(Object.assign({}, config), { fromChain: typeof fromChain === 'number'
30
28
  ? fromChain
@@ -34,12 +32,12 @@ export const WidgetProvider = (_a) => {
34
32
  ? toChain
35
33
  : typeof toChain === 'string'
36
34
  ? getChainByKey(toChain.toLowerCase()).id
37
- : ChainId.ETH, fromToken: (_a = config.fromToken) === null || _a === void 0 ? void 0 : _a.toLowerCase(), toToken: (_b = config.toToken) === null || _b === void 0 ? void 0 : _b.toLowerCase() });
35
+ : ChainId.ETH, fromToken: fromToken === null || fromToken === void 0 ? void 0 : fromToken.toLowerCase(), toToken: toToken === null || toToken === void 0 ? void 0 : toToken.toLowerCase() });
38
36
  }
39
37
  catch (e) {
40
38
  console.warn(e);
41
39
  return config;
42
40
  }
43
- }, [fromChain, other, toChain]);
41
+ }, [config, fromChain, fromToken, toChain, toToken]);
44
42
  return (_jsx(WidgetContext.Provider, Object.assign({ value: value }, { children: children })));
45
43
  };
@@ -4,5 +4,5 @@ export interface WidgetContextProps extends WidgetConfig {
4
4
  toChain?: number;
5
5
  }
6
6
  export interface WidgetProviderProps {
7
- config: WidgetConfig;
7
+ config?: WidgetConfig;
8
8
  }
package/types/widget.d.ts CHANGED
@@ -15,7 +15,7 @@ export interface WidgetConfig {
15
15
  fromToken?: string;
16
16
  toChain?: `${ChainKey}` | number;
17
17
  toToken?: string;
18
- enabledChains: number[];
18
+ disabledChains?: number[];
19
19
  disableInternalWalletManagement?: boolean;
20
20
  walletCallbacks?: {
21
21
  connect: {
package/utils/routes.d.ts CHANGED
@@ -7,4 +7,5 @@ export declare const routes: {
7
7
  swapRoutes: string;
8
8
  swap: string;
9
9
  };
10
+ export declare const routesValues: string[];
10
11
  export declare type RouteType = keyof typeof routes;
package/utils/routes.js CHANGED
@@ -1,9 +1,10 @@
1
1
  export const routes = {
2
2
  home: '/',
3
- selectWallet: '/select-wallet',
4
- settings: '/settings',
5
- fromToken: '/select-from-token',
6
- toToken: '/select-to-token',
7
- swapRoutes: '/swap-routes',
8
- swap: '/swap',
3
+ selectWallet: 'select-wallet',
4
+ settings: 'settings',
5
+ fromToken: 'select-from-token',
6
+ toToken: 'select-to-token',
7
+ swapRoutes: 'swap-routes',
8
+ swap: 'swap',
9
9
  };
10
+ export const routesValues = Object.values(routes);
package/config/rpcs.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const getRpcs: () => Record<number, string[]>;
package/config/rpcs.js DELETED
@@ -1,20 +0,0 @@
1
- import { ChainId } from '@lifinance/sdk';
2
- import { env } from './env';
3
- const rpcs = {
4
- [ChainId.ETH]: [env.LIFI_RPC_URL_MAINNET],
5
- // [ChainId.POL]: [env.LIFI_RPC_URL_POLYGON],
6
- // [ChainId.BSC]: [env.LIFI_RPC_URL_BSC],
7
- // [ChainId.DAI]: [env.LIFI_RPC_URL_XDAI],
8
- // [ChainId.FTM]: [env.LIFI_RPC_URL_FANTOM],
9
- // [ChainId.ARB]: [env.LIFI_RPC_URL_ARBITRUM],
10
- // Testnet
11
- [ChainId.ROP]: [env.LIFI_RPC_URL_ROPSTEN],
12
- [ChainId.RIN]: [env.LIFI_RPC_URL_RINKEBY],
13
- [ChainId.GOR]: [env.LIFI_RPC_URL_GORLI],
14
- [ChainId.KOV]: [env.LIFI_RPC_URL_KOVAN],
15
- [ChainId.ARBT]: [env.LIFI_RPC_URL_ARBITRUM_RINKEBY],
16
- [ChainId.OPTT]: [env.LIFI_RPC_URL_OPTIMISM_KOVAN],
17
- [ChainId.MUM]: [env.LIFI_RPC_URL_POLYGON_MUMBAI],
18
- [ChainId.BSCT]: [env.LIFI_RPC_URL_BSC_TESTNET],
19
- };
20
- export const getRpcs = () => Object.fromEntries(Object.entries(rpcs).filter(([_, value]) => !value));
@@ -1,9 +0,0 @@
1
- import 'react-i18next';
2
- import { defaultNS, resources } from '.';
3
-
4
- declare module 'react-i18next' {
5
- interface CustomTypeOptions {
6
- defaultNS: typeof defaultNS;
7
- resources: typeof resources['en'];
8
- }
9
- }
@@ -1 +0,0 @@
1
- /// <reference types="react-scripts" />