@lifi/widget 1.10.4 → 1.11.0
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/App.js +5 -9
- package/AppDrawer.js +1 -1
- package/AppDrawer.style.d.ts +1 -1
- package/AppDrawer.style.js +0 -1
- package/AppProvider.d.ts +1 -0
- package/AppProvider.js +5 -2
- package/components/AppContainer.d.ts +10 -0
- package/components/AppContainer.js +3 -6
- package/components/Card/Card.d.ts +11 -5
- package/components/Card/Card.js +29 -5
- package/components/Card/index.d.ts +0 -1
- package/components/Card/index.js +0 -1
- package/components/Dialog.d.ts +3 -0
- package/components/Dialog.js +23 -0
- package/components/GasSufficiencyMessage/GasSufficiencyMessage.d.ts +6 -0
- package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +48 -0
- package/components/{InsufficientGasOrFundsMessage/InsufficientGasOrFundsMessage.style.d.ts → GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts} +0 -0
- package/components/{InsufficientGasOrFundsMessage/InsufficientGasOrFundsMessage.style.js → GasSufficiencyMessage/GasSufficiencyMessage.style.js} +1 -0
- package/components/GasSufficiencyMessage/index.d.ts +1 -0
- package/components/GasSufficiencyMessage/index.js +1 -0
- package/components/Header/Header.js +1 -1
- package/components/Header/Header.style.js +2 -1
- package/components/Header/NavigationHeader.js +15 -11
- package/components/Header/WalletHeader.js +1 -1
- package/components/Header/index.d.ts +1 -0
- package/components/Header/index.js +1 -0
- package/components/Header/types.d.ts +9 -0
- package/components/Header/types.js +1 -0
- package/components/Header/useHeaderActionStore.d.ts +6 -0
- package/components/Header/useHeaderActionStore.js +21 -0
- package/components/PoweredBy/PoweredBy.js +0 -1
- package/components/ProgressToNextUpdate/ProgressToNextUpdate.js +14 -2
- package/components/ReverseTokensButton/ReverseTokensButton.js +5 -7
- package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/components/ReverseTokensButton/ReverseTokensButton.style.js +4 -2
- package/components/SelectTokenButton/SelectTokenButton.js +5 -5
- package/components/SelectTokenButton/SelectTokenButton.style.d.ts +3 -10
- package/components/SelectTokenButton/SelectTokenButton.style.js +0 -7
- package/components/SmallAvatar.d.ts +16 -0
- package/components/SmallAvatar.js +8 -0
- package/{pages/SwapPage → components/Step}/CircularProgress.d.ts +0 -0
- package/{pages/SwapPage → components/Step}/CircularProgress.js +0 -0
- package/{pages/SwapPage → components/Step}/CircularProgress.style.d.ts +0 -0
- package/{pages/SwapPage → components/Step}/CircularProgress.style.js +0 -0
- package/components/Step/Step.d.ts +7 -0
- package/{pages/SwapPage/StepItem.js → components/Step/Step.js} +6 -6
- package/{pages/SwapPage/ExecutionItem.d.ts → components/Step/StepProcess.d.ts} +1 -1
- package/{pages/SwapPage/ExecutionItem.js → components/Step/StepProcess.js} +2 -2
- package/{pages/SwapPage/ExecutionItem.style.d.ts → components/Step/StepProcess.style.d.ts} +1 -1
- package/{pages/SwapPage/ExecutionItem.style.js → components/Step/StepProcess.style.js} +0 -0
- package/{pages/SwapPage → components/Step}/StepTimer.d.ts +0 -0
- package/{pages/SwapPage → components/Step}/StepTimer.js +0 -0
- package/components/Step/index.d.ts +1 -0
- package/components/Step/index.js +1 -0
- package/components/Step/utils.d.ts +6 -0
- package/components/Step/utils.js +89 -0
- package/components/StepActions/StepActions.js +14 -5
- package/components/StepActions/StepActions.style.js +2 -2
- package/{pages/SwapPage → components/StepDivider}/StepDivider.d.ts +0 -0
- package/{pages/SwapPage → components/StepDivider}/StepDivider.js +0 -0
- package/{pages/SwapPage → components/StepDivider}/StepDivider.style.d.ts +0 -0
- package/{pages/SwapPage → components/StepDivider}/StepDivider.style.js +0 -0
- package/components/StepDivider/index.d.ts +1 -0
- package/components/StepDivider/index.js +1 -0
- package/components/SwapButton/SwapButton.js +7 -10
- package/components/SwapButton/SwapButton.style.d.ts +1 -1
- package/components/SwapButton/SwapButton.style.js +0 -4
- package/components/SwapButton/types.d.ts +2 -0
- package/components/SwapInProgress/SwapInProgress.js +7 -4
- package/components/SwapInProgress/SwapInProgress.style.d.ts +9 -21
- package/components/SwapInProgress/SwapInProgress.style.js +5 -6
- package/components/SwapInput/SwapInput.js +3 -3
- package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
- package/components/SwapInput/SwapInputAdornment.style.js +0 -2
- package/components/SwapRouteCard/SwapRouteCard.js +15 -15
- package/components/SwapRouteCard/SwapRouteCard.style.d.ts +0 -20
- package/components/SwapRouteCard/SwapRouteCard.style.js +7 -54
- package/components/SwapRouteCard/SwapRouteCardSkeleton.js +6 -10
- package/components/SwapRouteCard/SwapRouteNotFoundCard.js +3 -3
- package/components/SwapRouteCard/types.d.ts +0 -3
- package/components/{StepToken.d.ts → Token/Token.d.ts} +2 -1
- package/components/Token/Token.js +31 -0
- package/components/Token/Token.style.d.ts +24 -0
- package/components/Token/Token.style.js +31 -0
- package/components/Token/index.d.ts +2 -0
- package/components/Token/index.js +2 -0
- package/components/TokenAvatar/TokenAvatar.d.ts +7 -0
- package/components/TokenAvatar/TokenAvatar.js +8 -0
- package/components/TokenAvatar/TokenAvatar.style.d.ts +1 -0
- package/components/TokenAvatar/TokenAvatar.style.js +16 -0
- package/components/TokenAvatar/index.d.ts +2 -0
- package/components/TokenAvatar/index.js +2 -0
- package/components/TokenList/TokenList.js +2 -2
- package/components/TokenList/TokenListItem.d.ts +1 -0
- package/components/TokenList/TokenListItem.js +12 -6
- package/components/TokenList/types.d.ts +1 -0
- package/config/queryClient.d.ts +1 -1
- package/config/queryClient.js +1 -1
- package/config/theme.js +14 -1
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/index.d.ts +1 -1
- package/hooks/index.js +1 -1
- package/hooks/useChains.d.ts +8 -8
- package/hooks/useChains.js +1 -1
- package/hooks/useGasSufficiency.d.ts +15 -0
- package/hooks/useGasSufficiency.js +91 -0
- package/hooks/useRouteExecution.d.ts +3 -3
- package/hooks/useRouteExecution.js +22 -18
- package/hooks/useSwapRoutes.d.ts +1 -1
- package/hooks/useSwapRoutes.js +2 -14
- package/hooks/useTokenBalance.js +1 -1
- package/hooks/useTokenBalances.d.ts +2 -2
- package/hooks/useTokenBalances.js +7 -9
- package/hooks/useTokens.js +1 -1
- package/hooks/useTools.d.ts +10 -1
- package/hooks/useTools.js +13 -3
- package/i18n/en/translation.json +18 -9
- package/i18n/index.d.ts +12 -3
- package/icons/LiFiToolLogo.svg +6 -0
- package/package.json +8 -8
- package/pages/MainPage/MainPage.js +2 -3
- package/pages/MainPage/MainSwapButton.js +4 -5
- package/{components/SwapRoutes → pages/MainPage}/SwapRoutes.d.ts +0 -0
- package/pages/MainPage/SwapRoutes.js +36 -0
- package/{components/SwapRoutes → pages/MainPage}/SwapRoutes.style.d.ts +0 -0
- package/{components/SwapRoutes → pages/MainPage}/SwapRoutes.style.js +4 -0
- package/pages/SelectTokenPage/ChainSelect.js +2 -2
- package/pages/SelectTokenPage/SearchTokenInput.js +2 -2
- package/pages/SelectWalletPage/SelectWalletPage.js +4 -23
- package/pages/SettingsPage/AdvancedPreferences.js +1 -1
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
- package/pages/SettingsPage/EnabledBridgesSelect.js +7 -4
- package/pages/SettingsPage/EnabledExchangesSelect.js +7 -4
- package/pages/SettingsPage/GasPriceSelect.js +2 -2
- package/pages/SettingsPage/RoutePrioritySelect.js +2 -2
- package/pages/SettingsPage/SlippageInput.js +2 -2
- package/pages/SwapDetailsPage/SwapDetailsPage.d.ts +2 -0
- package/pages/SwapDetailsPage/SwapDetailsPage.js +63 -0
- package/pages/SwapDetailsPage/SwapDetailsPage.style.d.ts +11 -0
- package/pages/SwapDetailsPage/SwapDetailsPage.style.js +5 -0
- package/pages/SwapDetailsPage/index.d.ts +1 -0
- package/pages/SwapDetailsPage/index.js +1 -0
- package/pages/SwapHistoryPage/SwapHistoryEmpty.d.ts +2 -0
- package/pages/SwapHistoryPage/SwapHistoryEmpty.js +14 -0
- package/pages/SwapHistoryPage/SwapHistoryItem.d.ts +5 -0
- package/pages/SwapHistoryPage/SwapHistoryItem.js +23 -0
- package/pages/SwapHistoryPage/SwapHistoryPage.d.ts +2 -0
- package/pages/SwapHistoryPage/SwapHistoryPage.js +14 -0
- package/pages/SwapHistoryPage/index.d.ts +1 -0
- package/pages/SwapHistoryPage/index.js +1 -0
- package/pages/SwapPage/StatusBottomSheet.js +3 -4
- package/pages/SwapPage/SwapPage.js +9 -9
- package/pages/SwapPage/SwapPage.style.d.ts +0 -33
- package/pages/SwapPage/SwapPage.style.js +2 -9
- package/pages/SwapRoutesPage/SwapRoutesPage.js +9 -5
- package/pages/SwapRoutesPage/SwapRoutesPage.style.js +1 -1
- package/providers/WalletProvider/WalletProvider.js +7 -26
- package/providers/WalletProvider/types.d.ts +0 -1
- package/providers/WidgetProvider/WidgetProvider.js +1 -1
- package/stores/route/index.d.ts +1 -1
- package/stores/route/index.js +1 -1
- package/stores/route/types.d.ts +2 -4
- package/stores/route/useExecutingRoutes.d.ts +2 -1
- package/stores/route/useExecutingRoutes.js +4 -2
- package/stores/route/useRouteStore.d.ts +4 -1
- package/stores/route/useRouteStore.js +23 -24
- package/stores/route/useSwapHistory.d.ts +2 -0
- package/stores/route/useSwapHistory.js +11 -0
- package/stores/settings/useSettingsStore.d.ts +13 -0
- package/types/widget.d.ts +3 -4
- package/utils/navigationRoutes.d.ts +2 -0
- package/utils/navigationRoutes.js +8 -6
- package/components/Card/CardContainer.d.ts +0 -11
- package/components/Card/CardContainer.js +0 -16
- package/components/InsufficientGasOrFundsMessage/InsufficientGasOrFundsMessage.d.ts +0 -3
- package/components/InsufficientGasOrFundsMessage/InsufficientGasOrFundsMessage.js +0 -31
- package/components/InsufficientGasOrFundsMessage/index.d.ts +0 -1
- package/components/InsufficientGasOrFundsMessage/index.js +0 -1
- package/components/StepToken.js +0 -21
- package/components/SwapRoutes/SwapRoutes.js +0 -32
- package/components/SwapRoutes/SwapRoutesUpdateProgress.d.ts +0 -3
- package/components/SwapRoutes/SwapRoutesUpdateProgress.js +0 -24
- package/components/SwapRoutes/index.d.ts +0 -1
- package/components/SwapRoutes/index.js +0 -1
- package/hooks/useHasSufficientBalance.d.ts +0 -5
- package/hooks/useHasSufficientBalance.js +0 -72
- package/pages/SwapPage/StepItem.d.ts +0 -7
- package/stores/route/useCurrentRoute.d.ts +0 -2
- package/stores/route/useCurrentRoute.js +0 -5
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Container as MuiContainer } from '@mui/material';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
export const Container = styled(MuiContainer)(({ theme }) => ({
|
|
4
|
-
padding: theme.spacing(1, 3
|
|
5
|
-
}));
|
|
6
|
-
export const Button = styled(MuiButton)(({ theme }) => ({
|
|
7
|
-
textTransform: 'none',
|
|
8
|
-
borderRadius: theme.shape.borderRadiusSecondary,
|
|
9
|
-
padding: theme.spacing(1.25, 2),
|
|
10
|
-
fontSize: '1rem',
|
|
11
|
-
marginTop: theme.spacing(2),
|
|
4
|
+
padding: theme.spacing(1, 3),
|
|
12
5
|
}));
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
3
|
import { useNavigate } from 'react-router-dom';
|
|
4
|
+
import { useSetHeaderAction } from '../../components/Header';
|
|
5
|
+
import { ProgressToNextUpdate } from '../../components/ProgressToNextUpdate';
|
|
4
6
|
import { SwapRouteCard, SwapRouteCardSkeleton, SwapRouteNotFoundCard, } from '../../components/SwapRouteCard';
|
|
5
7
|
import { useSwapRoutes } from '../../hooks';
|
|
6
|
-
import {
|
|
8
|
+
import { useSetExecutableRoute } from '../../stores';
|
|
7
9
|
import { navigationRoutes } from '../../utils';
|
|
8
10
|
import { Stack } from './SwapRoutesPage.style';
|
|
9
11
|
export const SwapRoutesPage = () => {
|
|
10
12
|
const navigate = useNavigate();
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
+
const setHeaderAction = useSetHeaderAction();
|
|
14
|
+
const { routes: swapRoutes, isLoading, isFetching, isFetched, dataUpdatedAt, refetchTime, refetch, } = useSwapRoutes();
|
|
13
15
|
const setExecutableRoute = useSetExecutableRoute();
|
|
14
16
|
const handleRouteClick = (route) => {
|
|
15
17
|
setExecutableRoute(route);
|
|
16
18
|
navigate(navigationRoutes.swap, {
|
|
17
19
|
state: { routeId: route.id },
|
|
18
|
-
replace: true,
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
22
|
useEffect(() => {
|
|
@@ -25,6 +26,9 @@ export const SwapRoutesPage = () => {
|
|
|
25
26
|
// redirect to the home page if no routes are found on page reload
|
|
26
27
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27
28
|
}, []);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
return setHeaderAction(navigationRoutes.swapRoutes, _jsx(ProgressToNextUpdate, { updatedAt: dataUpdatedAt, timeToUpdate: refetchTime, isLoading: isFetching, onClick: () => refetch(), sx: { marginRight: -1 }, size: "medium", edge: "end" }));
|
|
31
|
+
}, [dataUpdatedAt, isFetching, refetch, refetchTime, setHeaderAction]);
|
|
28
32
|
const routeNotFound = !(swapRoutes === null || swapRoutes === void 0 ? void 0 : swapRoutes.length) && isFetched;
|
|
29
|
-
return (_jsx(Stack, Object.assign({ direction: "column", spacing: 2 }, { children: routeNotFound ? (_jsx(SwapRouteNotFoundCard, {
|
|
33
|
+
return (_jsx(Stack, Object.assign({ direction: "column", spacing: 2 }, { children: routeNotFound ? (_jsx(SwapRouteNotFoundCard, { dense: true })) : isLoading || isFetching ? (Array.from({ length: 3 }).map((_, index) => (_jsx(SwapRouteCardSkeleton, { dense: true }, index)))) : (swapRoutes === null || swapRoutes === void 0 ? void 0 : swapRoutes.map((route, index) => (_jsx(SwapRouteCard, { route: route, onClick: () => handleRouteClick(route) }, route.id)))) })));
|
|
30
34
|
};
|
|
@@ -20,7 +20,6 @@ const initialContext = {
|
|
|
20
20
|
switchChain: stub,
|
|
21
21
|
addChain: stub,
|
|
22
22
|
addToken: stub,
|
|
23
|
-
attemptEagerConnect: stub,
|
|
24
23
|
account: {},
|
|
25
24
|
};
|
|
26
25
|
const WalletContext = createContext(initialContext);
|
|
@@ -48,7 +47,8 @@ export const WalletProvider = ({ children }) => {
|
|
|
48
47
|
}), [config.walletManagement, walletManagementDisconnect]);
|
|
49
48
|
// only for injected wallets
|
|
50
49
|
const switchChain = useCallback((chainId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
51
|
-
|
|
50
|
+
var _a;
|
|
51
|
+
if ((_a = config.walletManagement) === null || _a === void 0 ? void 0 : _a.switchChain) {
|
|
52
52
|
const signer = yield config.walletManagement.switchChain(chainId);
|
|
53
53
|
const account = yield extractAccountFromSigner(signer);
|
|
54
54
|
setAccount(account);
|
|
@@ -56,29 +56,19 @@ export const WalletProvider = ({ children }) => {
|
|
|
56
56
|
return walletSwitchChain(chainId);
|
|
57
57
|
}), [config.walletManagement]);
|
|
58
58
|
const addChain = useCallback((chainId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
-
|
|
59
|
+
var _b;
|
|
60
|
+
if ((_b = config.walletManagement) === null || _b === void 0 ? void 0 : _b.addChain) {
|
|
60
61
|
return config.walletManagement.addChain(chainId);
|
|
61
62
|
}
|
|
62
63
|
return walletAddChain(chainId);
|
|
63
64
|
}), [config.walletManagement]);
|
|
64
65
|
const addToken = useCallback((chainId, token) => __awaiter(void 0, void 0, void 0, function* () {
|
|
65
|
-
|
|
66
|
+
var _c;
|
|
67
|
+
if ((_c = config.walletManagement) === null || _c === void 0 ? void 0 : _c.addToken) {
|
|
66
68
|
return config.walletManagement.addToken(token, chainId);
|
|
67
69
|
}
|
|
68
70
|
return switchChainAndAddToken(chainId, token);
|
|
69
71
|
}), [config.walletManagement]);
|
|
70
|
-
const attemptEagerConnect = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
-
if (config.walletManagement) {
|
|
72
|
-
try {
|
|
73
|
-
const signer = yield config.walletManagement.getSigner();
|
|
74
|
-
const account = yield extractAccountFromSigner(signer);
|
|
75
|
-
setAccount(() => (Object.assign({}, account)));
|
|
76
|
-
}
|
|
77
|
-
catch (e) {
|
|
78
|
-
console.warn('WalletProvider: attempted eager connect.', e);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}), [config.walletManagement]);
|
|
82
72
|
// keep account information up to date
|
|
83
73
|
useEffect(() => {
|
|
84
74
|
const updateAccount = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -99,17 +89,8 @@ export const WalletProvider = ({ children }) => {
|
|
|
99
89
|
switchChain,
|
|
100
90
|
addChain,
|
|
101
91
|
addToken,
|
|
102
|
-
attemptEagerConnect,
|
|
103
|
-
account,
|
|
104
|
-
}), [
|
|
105
92
|
account,
|
|
106
|
-
|
|
107
|
-
addToken,
|
|
108
|
-
connect,
|
|
109
|
-
disconnect,
|
|
110
|
-
switchChain,
|
|
111
|
-
attemptEagerConnect,
|
|
112
|
-
]);
|
|
93
|
+
}), [account, addChain, addToken, connect, disconnect, switchChain]);
|
|
113
94
|
return (_jsx(WalletContext.Provider, Object.assign({ value: value }, { children: children })));
|
|
114
95
|
};
|
|
115
96
|
const extractAccountFromSigner = (signer) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -8,7 +8,6 @@ export interface WalletContextProps {
|
|
|
8
8
|
disconnect(): void;
|
|
9
9
|
switchChain(chainId: number): Promise<boolean>;
|
|
10
10
|
connect(wallet?: Wallet | undefined): Promise<void>;
|
|
11
|
-
attemptEagerConnect(): Promise<void>;
|
|
12
11
|
}
|
|
13
12
|
export interface WalletAccount {
|
|
14
13
|
address?: string;
|
|
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { ChainId, getChainByKey } from '@lifi/sdk';
|
|
14
|
-
import { updateLiFiConfig } from '@lifi/widget/config/lifi';
|
|
15
14
|
import { createContext, useContext, useEffect, useMemo } from 'react';
|
|
15
|
+
import { updateLiFiConfig } from '../../config/lifi';
|
|
16
16
|
const stub = () => {
|
|
17
17
|
throw new Error('You forgot to wrap your component in <WidgetProvider>.');
|
|
18
18
|
};
|
package/stores/route/index.d.ts
CHANGED
package/stores/route/index.js
CHANGED
package/stores/route/types.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Route } from '@lifi/sdk';
|
|
2
2
|
export interface RouteExecutionStore {
|
|
3
|
-
|
|
4
|
-
routes: Record<string, RouteExecution>;
|
|
5
|
-
setCurrentRoute: (route?: Route) => void;
|
|
3
|
+
routes: Partial<Record<string, RouteExecution>>;
|
|
6
4
|
setExecutableRoute: (route: Route) => void;
|
|
7
5
|
updateRoute: (route: Route) => void;
|
|
8
6
|
restartRoute: (routeId: string) => void;
|
|
9
|
-
|
|
7
|
+
deleteRoute: (routeId: string) => void;
|
|
10
8
|
}
|
|
11
9
|
export declare type RouteExecutionStatus = 'error' | 'idle' | 'loading' | 'success';
|
|
12
10
|
export interface RouteExecution {
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { RouteExecution } from './types';
|
|
2
|
+
export declare const useExecutingRoutes: (address?: string) => RouteExecution[];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import shallow from 'zustand/shallow';
|
|
1
2
|
import { useRouteStore } from './useRouteStore';
|
|
2
|
-
export const useExecutingRoutes = () => {
|
|
3
|
-
return useRouteStore((state) => Object.values(state.routes).filter((
|
|
3
|
+
export const useExecutingRoutes = (address) => {
|
|
4
|
+
return useRouteStore((state) => Object.values(state.routes).filter((item) => (item === null || item === void 0 ? void 0 : item.route.fromAddress) === address &&
|
|
5
|
+
((item === null || item === void 0 ? void 0 : item.status) === 'loading' || (item === null || item === void 0 ? void 0 : item.status) === 'error')), shallow);
|
|
4
6
|
};
|
|
@@ -2,13 +2,16 @@ import type { RouteExecutionStore } from './types';
|
|
|
2
2
|
export declare const useRouteStore: import("zustand").UseBoundStore<Omit<Omit<import("zustand").StoreApi<RouteExecutionStore>, "persist"> & {
|
|
3
3
|
persist: {
|
|
4
4
|
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<RouteExecutionStore, {
|
|
5
|
-
routes: Record<string, import("./types").RouteExecution
|
|
5
|
+
routes: Partial<Record<string, import("./types").RouteExecution>>;
|
|
6
6
|
}>>) => void;
|
|
7
7
|
clearStorage: () => void;
|
|
8
8
|
rehydrate: () => Promise<void>;
|
|
9
9
|
hasHydrated: () => boolean;
|
|
10
10
|
onHydrate: (fn: (state: RouteExecutionStore) => void) => () => void;
|
|
11
11
|
onFinishHydration: (fn: (state: RouteExecutionStore) => void) => () => void;
|
|
12
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<RouteExecutionStore, {
|
|
13
|
+
routes: Partial<Record<string, import("./types").RouteExecution>>;
|
|
14
|
+
}>>;
|
|
12
15
|
};
|
|
13
16
|
}, "setState"> & {
|
|
14
17
|
setState(nextStateOrUpdater: RouteExecutionStore | Partial<RouteExecutionStore> | ((state: import("immer/dist/internal").WritableDraft<RouteExecutionStore>) => void), shouldReplace?: boolean | undefined): void;
|
|
@@ -3,41 +3,40 @@ import { persist } from 'zustand/middleware';
|
|
|
3
3
|
import { immer } from 'zustand/middleware/immer';
|
|
4
4
|
export const useRouteStore = create()(persist(immer((set) => ({
|
|
5
5
|
routes: {},
|
|
6
|
-
setCurrentRoute: (route) => set((state) => {
|
|
7
|
-
state.currentRoute = route;
|
|
8
|
-
}),
|
|
9
6
|
setExecutableRoute: (route) => set((state) => {
|
|
10
7
|
if (!state.routes[route.id]) {
|
|
11
8
|
// clean previous idle routes that were not executed
|
|
12
9
|
Object.keys(state.routes)
|
|
13
|
-
.filter((routeId) => state.routes[routeId].status === 'idle')
|
|
10
|
+
.filter((routeId) => { var _a; return ((_a = state.routes[routeId]) === null || _a === void 0 ? void 0 : _a.status) === 'idle'; })
|
|
14
11
|
.forEach((routeId) => delete state.routes[routeId]);
|
|
15
12
|
state.routes[route.id] = {
|
|
16
13
|
route,
|
|
17
14
|
status: 'idle',
|
|
18
15
|
};
|
|
19
|
-
state.currentRoute = route;
|
|
20
16
|
}
|
|
21
17
|
}),
|
|
22
18
|
updateRoute: (route) => set((state) => {
|
|
23
|
-
state.routes[route.id]
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
if (state.routes[route.id]) {
|
|
20
|
+
state.routes[route.id].route = route;
|
|
21
|
+
const isFailed = route.steps.some((step) => { var _a; return ((_a = step.execution) === null || _a === void 0 ? void 0 : _a.status) === 'FAILED'; });
|
|
22
|
+
if (isFailed) {
|
|
23
|
+
state.routes[route.id].status = 'error';
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const isDone = route.steps.every((step) => { var _a; return ((_a = step.execution) === null || _a === void 0 ? void 0 : _a.status) === 'DONE'; });
|
|
27
|
+
if (isDone) {
|
|
28
|
+
state.routes[route.id].status = 'success';
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const isLoading = route.steps.some((step) => step.execution);
|
|
32
|
+
if (isLoading) {
|
|
33
|
+
state.routes[route.id].status = 'loading';
|
|
34
|
+
}
|
|
37
35
|
}
|
|
38
36
|
}),
|
|
39
37
|
restartRoute: (routeId) => set((state) => {
|
|
40
|
-
|
|
38
|
+
var _a;
|
|
39
|
+
(_a = state.routes[routeId]) === null || _a === void 0 ? void 0 : _a.route.steps.forEach((step) => {
|
|
41
40
|
var _a, _b;
|
|
42
41
|
const stepHasFailed = ((_a = step.execution) === null || _a === void 0 ? void 0 : _a.status) === 'FAILED';
|
|
43
42
|
// check if the step has been cancelled which is a "failed" state
|
|
@@ -50,10 +49,10 @@ export const useRouteStore = create()(persist(immer((set) => ({
|
|
|
50
49
|
});
|
|
51
50
|
state.routes[routeId].status = 'loading';
|
|
52
51
|
}),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
deleteRoute: (routeId) => set((state) => {
|
|
53
|
+
if (state.routes[routeId]) {
|
|
54
|
+
delete state.routes[routeId];
|
|
55
|
+
}
|
|
57
56
|
}),
|
|
58
57
|
})), {
|
|
59
58
|
name: 'li.fi-widget-routes',
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import shallow from 'zustand/shallow';
|
|
2
|
+
import { useRouteStore } from './useRouteStore';
|
|
3
|
+
export const useSwapHistory = (address) => {
|
|
4
|
+
return useRouteStore((state) => Object.values(state.routes)
|
|
5
|
+
.filter((item) => (item === null || item === void 0 ? void 0 : item.route.fromAddress) === address && (item === null || item === void 0 ? void 0 : item.status) === 'success')
|
|
6
|
+
.sort((a, b) => {
|
|
7
|
+
var _a, _b, _c, _d;
|
|
8
|
+
return ((_b = (_a = b === null || b === void 0 ? void 0 : b.route.steps[0].execution) === null || _a === void 0 ? void 0 : _a.process[0].startedAt) !== null && _b !== void 0 ? _b : 0) -
|
|
9
|
+
((_d = (_c = a === null || a === void 0 ? void 0 : a.route.steps[0].execution) === null || _c === void 0 ? void 0 : _c.process[0].startedAt) !== null && _d !== void 0 ? _d : 0);
|
|
10
|
+
}), shallow);
|
|
11
|
+
};
|
|
@@ -19,6 +19,19 @@ export declare const useSettingsStore: import("zustand").UseBoundStore<Omit<Omit
|
|
|
19
19
|
hasHydrated: () => boolean;
|
|
20
20
|
onHydrate: (fn: (state: SettingsStore) => void) => () => void;
|
|
21
21
|
onFinishHydration: (fn: (state: SettingsStore) => void) => () => void;
|
|
22
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<SettingsStore, {
|
|
23
|
+
setValue: import("./types").ValueSetter<SettingsState>;
|
|
24
|
+
setValues: import("./types").ValuesSetter<SettingsState>;
|
|
25
|
+
initializeTools(toolType: import("./types").SettingsToolType, tools: string[]): void;
|
|
26
|
+
setTools(toolType: import("./types").SettingsToolType, tools: string[], availableTools: (Pick<import("@lifi/types").Bridge, "key"> | Pick<import("@lifi/types").Exchange, "key">)[]): void;
|
|
27
|
+
advancedPreferences: boolean;
|
|
28
|
+
appearance: import("../..").Appearance;
|
|
29
|
+
routePriority: "RECOMMENDED" | "FASTEST" | "CHEAPEST" | "SAFEST";
|
|
30
|
+
slippage: string;
|
|
31
|
+
gasPrice: string;
|
|
32
|
+
_enabledBridges?: Record<string, boolean> | undefined;
|
|
33
|
+
_enabledExchanges?: Record<string, boolean> | undefined;
|
|
34
|
+
}>>;
|
|
22
35
|
};
|
|
23
36
|
}, "setState"> & {
|
|
24
37
|
setState(nextStateOrUpdater: SettingsStore | Partial<SettingsStore> | ((state: import("immer/dist/internal").WritableDraft<SettingsStore>) => void), shouldReplace?: boolean | undefined): void;
|
package/types/widget.d.ts
CHANGED
|
@@ -12,10 +12,9 @@ export declare type ThemeConfig = {
|
|
|
12
12
|
export interface WidgetWalletManagement {
|
|
13
13
|
connect(): Promise<Signer>;
|
|
14
14
|
disconnect(): Promise<void>;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
addChain(chainId: number): Promise<boolean>;
|
|
15
|
+
switchChain?(chainId: number): Promise<Signer>;
|
|
16
|
+
addToken?(token: Token, chainId: number): Promise<void>;
|
|
17
|
+
addChain?(chainId: number): Promise<boolean>;
|
|
19
18
|
signer?: Signer;
|
|
20
19
|
}
|
|
21
20
|
interface WidgetConfigBase {
|
|
@@ -6,6 +6,8 @@ export declare const navigationRoutes: {
|
|
|
6
6
|
toToken: string;
|
|
7
7
|
swapRoutes: string;
|
|
8
8
|
swap: string;
|
|
9
|
+
swapHistory: string;
|
|
10
|
+
swapDetails: string;
|
|
9
11
|
};
|
|
10
12
|
export declare const navigationRoutesValues: string[];
|
|
11
13
|
export declare type NavigationRouteType = keyof typeof navigationRoutes;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export const navigationRoutes = {
|
|
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
|
+
swapHistory: '/swap-history',
|
|
10
|
+
swapDetails: '/swap-details',
|
|
9
11
|
};
|
|
10
12
|
export const navigationRoutesValues = Object.values(navigationRoutes);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const CardContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
3
|
-
children?: import("react").ReactNode;
|
|
4
|
-
component?: import("react").ElementType<any> | undefined;
|
|
5
|
-
ref?: import("react").Ref<unknown> | undefined;
|
|
6
|
-
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
7
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
8
|
-
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
9
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
10
|
-
isError?: boolean | undefined;
|
|
11
|
-
}, {}, {}>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Box } from '@mui/material';
|
|
2
|
-
import { styled } from '@mui/material/styles';
|
|
3
|
-
export const CardContainer = styled(Box, {
|
|
4
|
-
shouldForwardProp: (prop) => prop !== 'isError',
|
|
5
|
-
})(({ theme, isError }) => ({
|
|
6
|
-
backgroundColor: theme.palette.background.paper,
|
|
7
|
-
border: `1px solid`,
|
|
8
|
-
borderColor: isError
|
|
9
|
-
? theme.palette.error.main
|
|
10
|
-
: theme.palette.mode === 'light'
|
|
11
|
-
? theme.palette.grey[300]
|
|
12
|
-
: theme.palette.grey[800],
|
|
13
|
-
borderRadius: theme.shape.borderRadius,
|
|
14
|
-
overflow: 'hidden',
|
|
15
|
-
position: 'relative',
|
|
16
|
-
}));
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Warning as WarningIcon } from '@mui/icons-material';
|
|
3
|
-
import { Box, Typography } from '@mui/material';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { CardTitle } from '../../components/Card';
|
|
6
|
-
import { useHasSufficientBalance } from '../../hooks';
|
|
7
|
-
import { MessageCard } from './InsufficientGasOrFundsMessage.style';
|
|
8
|
-
export const InsufficientGasOrFundsMessage = (props) => {
|
|
9
|
-
const { t } = useTranslation();
|
|
10
|
-
const { hasGasOnStartChain, hasGasOnCrossChain, hasSufficientBalance } = useHasSufficientBalance();
|
|
11
|
-
if (hasSufficientBalance && hasGasOnStartChain && hasGasOnCrossChain) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
let title;
|
|
15
|
-
let message;
|
|
16
|
-
if (!hasSufficientBalance) {
|
|
17
|
-
message = t(`swap.warning.message.insufficientFunds`);
|
|
18
|
-
}
|
|
19
|
-
if (!hasGasOnStartChain) {
|
|
20
|
-
title = t(`swap.warning.title.insufficientGas`);
|
|
21
|
-
message = t(`swap.warning.message.insufficientGasOnStartChain`);
|
|
22
|
-
}
|
|
23
|
-
if (!hasGasOnCrossChain) {
|
|
24
|
-
title = t(`swap.warning.title.insufficientGas`);
|
|
25
|
-
message = t(`swap.warning.message.insufficientGasOnDestinationChain`);
|
|
26
|
-
}
|
|
27
|
-
return (_jsxs(MessageCard, Object.assign({}, props, { children: [_jsx(WarningIcon, { sx: {
|
|
28
|
-
marginTop: 2,
|
|
29
|
-
marginLeft: 2,
|
|
30
|
-
} }), _jsxs(Box, { children: [title ? _jsx(CardTitle, { children: title }) : null, _jsx(Typography, Object.assign({ variant: "body2", px: 2, pb: 2, pt: title ? 1 : 2 }, { children: message }))] })] })));
|
|
31
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './InsufficientGasOrFundsMessage';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './InsufficientGasOrFundsMessage';
|
package/components/StepToken.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Avatar, Box, Typography } from '@mui/material';
|
|
14
|
-
import { formatTokenAmount } from '../utils';
|
|
15
|
-
import { TextFitter } from './TextFitter';
|
|
16
|
-
export const StepToken = (_a) => {
|
|
17
|
-
var { token } = _a, other = __rest(_a, ["token"]);
|
|
18
|
-
return (_jsxs(Box, Object.assign({ flex: 1 }, other, { children: [_jsxs(Box, Object.assign({ display: "flex", flex: 1 }, { children: [_jsx(Avatar, Object.assign({ src: token.logoURI, alt: token.symbol, sx: { marginRight: 2 } }, { children: token.symbol[0] })), _jsx(TextFitter, Object.assign({ height: 32, textStyle: {
|
|
19
|
-
fontWeight: 700,
|
|
20
|
-
} }, { children: formatTokenAmount(token.amount, token.decimals) }))] })), _jsx(Typography, Object.assign({ fontSize: 14, lineHeight: 1, fontWeight: "500", color: "text.secondary", mr: 1, ml: 6 }, { children: token.symbol }))] })));
|
|
21
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable react/no-array-index-key */
|
|
3
|
-
import { KeyboardArrowRight as KeyboardArrowRightIcon } from '@mui/icons-material';
|
|
4
|
-
import { Box, IconButton } from '@mui/material';
|
|
5
|
-
import { useCallback } from 'react';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useNavigate } from 'react-router-dom';
|
|
8
|
-
import { useSwapRoutes } from '../../hooks';
|
|
9
|
-
import { useCurrentRoute } from '../../stores';
|
|
10
|
-
import { navigationRoutes } from '../../utils';
|
|
11
|
-
import { CardContainer, CardTitle } from '../Card';
|
|
12
|
-
import { SwapRouteCard, SwapRouteCardSkeleton, SwapRouteNotFoundCard, } from '../SwapRouteCard';
|
|
13
|
-
import { Stack } from './SwapRoutes.style';
|
|
14
|
-
import { SwapRoutesUpdateProgress } from './SwapRoutesUpdateProgress';
|
|
15
|
-
export const SwapRoutes = (props) => {
|
|
16
|
-
const { t } = useTranslation();
|
|
17
|
-
const navigate = useNavigate();
|
|
18
|
-
const [currentRoute] = useCurrentRoute();
|
|
19
|
-
const { routes: swapRoutes, isLoading, isFetching, isFetched, } = useSwapRoutes();
|
|
20
|
-
const handleCardClick = useCallback(() => {
|
|
21
|
-
navigate(navigationRoutes.swapRoutes);
|
|
22
|
-
}, [navigate]);
|
|
23
|
-
if (!(swapRoutes === null || swapRoutes === void 0 ? void 0 : swapRoutes.length) && !isLoading && !isFetching && !isFetched) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const routeNotFound = !(swapRoutes === null || swapRoutes === void 0 ? void 0 : swapRoutes.length) && isFetched;
|
|
27
|
-
return (_jsxs(CardContainer, Object.assign({}, props, { children: [_jsx(CardTitle, { children: t('swap.routes') }), !routeNotFound ? (_jsx(SwapRoutesUpdateProgress, { sx: {
|
|
28
|
-
position: 'absolute',
|
|
29
|
-
top: 8,
|
|
30
|
-
right: 8,
|
|
31
|
-
} })) : null, _jsxs(Box, Object.assign({ sx: { display: 'flex', alignItems: 'center' } }, { children: [_jsx(Stack, Object.assign({ direction: "row", py: 2, pl: 2, pr: routeNotFound ? 2 : 1 }, { children: routeNotFound ? (_jsx(SwapRouteNotFoundCard, { minWidth: "100%", dense: true })) : isLoading || isFetching || !currentRoute ? (_jsx(SwapRouteCardSkeleton, { minWidth: "100%", active: true, dense: true })) : (_jsx(SwapRouteCard, { minWidth: "100%", route: currentRoute, active: true, dense: true })) })), !routeNotFound ? (_jsx(Box, Object.assign({ py: 1, pr: 1 }, { children: _jsx(IconButton, Object.assign({ onClick: handleCardClick, size: "medium", "aria-label": "swap-routes" }, { children: _jsx(KeyboardArrowRightIcon, {}) })) }))) : null] }))] })));
|
|
32
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
/* eslint-disable react/no-array-index-key */
|
|
14
|
-
import { Box } from '@mui/material';
|
|
15
|
-
import { useSwapRoutes } from '../../hooks';
|
|
16
|
-
import { ProgressToNextUpdate } from '../ProgressToNextUpdate';
|
|
17
|
-
export const SwapRoutesUpdateProgress = (_a) => {
|
|
18
|
-
var { sx } = _a, other = __rest(_a, ["sx"]);
|
|
19
|
-
const { isLoading, isFetching, dataUpdatedAt, refetchTime, refetch } = useSwapRoutes();
|
|
20
|
-
if (isLoading) {
|
|
21
|
-
return _jsx(Box, { width: 24, height: 24, sx: sx });
|
|
22
|
-
}
|
|
23
|
-
return (_jsx(ProgressToNextUpdate, Object.assign({ updatedAt: dataUpdatedAt, timeToUpdate: refetchTime, isLoading: isFetching, onClick: () => refetch(), sx: sx }, other)));
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SwapRoutes';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SwapRoutes';
|