@lifi/widget 3.0.0-alpha.33 → 3.0.0-alpha.35
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.tsx +6 -3
- package/AppDefault.tsx +3 -3
- package/AppDrawer.tsx +3 -5
- package/_esm/App.js +6 -3
- package/_esm/App.js.map +1 -1
- package/_esm/AppDefault.js +3 -3
- package/_esm/AppDefault.js.map +1 -1
- package/_esm/AppDrawer.js +3 -3
- package/_esm/AppDrawer.js.map +1 -1
- package/_esm/components/ActiveTransactions/ActiveTransactions.d.ts +2 -2
- package/_esm/components/ActiveTransactions/ActiveTransactions.js +1 -1
- package/_esm/components/ActiveTransactions/ActiveTransactions.js.map +1 -1
- package/_esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +1 -1
- package/_esm/components/AmountInput/AmountInput.d.ts +3 -3
- package/_esm/components/AmountInput/AmountInput.js +2 -2
- package/_esm/components/AmountInput/AmountInput.js.map +1 -1
- package/_esm/components/AppContainer.js +3 -2
- package/_esm/components/AppContainer.js.map +1 -1
- package/_esm/components/Avatar/AccountAvatar.d.ts +3 -1
- package/_esm/components/Avatar/AccountAvatar.js +3 -3
- package/_esm/components/Avatar/AccountAvatar.js.map +1 -1
- package/_esm/components/Avatar/utils.d.ts +1 -1
- package/_esm/components/Avatar/utils.js +1 -1
- package/_esm/components/Avatar/utils.js.map +1 -1
- package/_esm/components/Card/Card.d.ts +7 -19
- package/_esm/components/Card/Card.js +36 -42
- package/_esm/components/Card/Card.js.map +1 -1
- package/_esm/components/Card/CardLabel.js +5 -3
- package/_esm/components/Card/CardLabel.js.map +1 -1
- package/_esm/components/Card/InputCard.d.ts +4 -0
- package/_esm/components/Card/InputCard.js +7 -0
- package/_esm/components/Card/InputCard.js.map +1 -0
- package/_esm/components/ChainSelect/ChainSelect.js +1 -1
- package/_esm/components/ChainSelect/ChainSelect.js.map +1 -1
- package/_esm/components/ChainSelect/ChainSelect.style.d.ts +2 -10
- package/_esm/components/ContractComponent/ContractComponent.d.ts +2 -2
- package/_esm/components/ContractComponent/ContractComponent.js.map +1 -1
- package/_esm/components/ContractComponent/ItemPrice.d.ts +8 -0
- package/_esm/components/ContractComponent/ItemPrice.js +23 -0
- package/_esm/components/ContractComponent/ItemPrice.js.map +1 -0
- package/_esm/components/{NFT → ContractComponent/NFT}/NFT.js +5 -11
- package/_esm/components/ContractComponent/NFT/NFT.js.map +1 -0
- package/_esm/components/ContractComponent/NFT/NFT.style.js.map +1 -0
- package/_esm/components/{NFT → ContractComponent/NFT}/NFTBase.js +1 -1
- package/_esm/components/ContractComponent/NFT/NFTBase.js.map +1 -0
- package/_esm/components/{NFT → ContractComponent/NFT}/types.d.ts +2 -3
- package/_esm/components/ContractComponent/NFT/types.js.map +1 -0
- package/_esm/components/Dialog.d.ts +2 -9
- package/_esm/components/Dialog.js +1 -0
- package/_esm/components/Dialog.js.map +1 -1
- package/_esm/components/Header/BackButton.d.ts +3 -0
- package/_esm/components/Header/BackButton.js +8 -0
- package/_esm/components/Header/BackButton.js.map +1 -0
- package/_esm/components/Header/CloseDrawerButton.d.ts +5 -1
- package/_esm/components/Header/CloseDrawerButton.js +8 -2
- package/_esm/components/Header/CloseDrawerButton.js.map +1 -1
- package/_esm/components/Header/Header.style.d.ts +4 -1
- package/_esm/components/Header/Header.style.js +24 -16
- package/_esm/components/Header/Header.style.js.map +1 -1
- package/_esm/components/Header/NavigationHeader.js +8 -9
- package/_esm/components/Header/NavigationHeader.js.map +1 -1
- package/_esm/components/Header/NavigationTabs.js +1 -1
- package/_esm/components/Header/NavigationTabs.js.map +1 -1
- package/_esm/components/Header/SettingsButton.style.d.ts +1 -1
- package/_esm/components/Header/TransactionHistoryButton.js +1 -1
- package/_esm/components/Header/TransactionHistoryButton.js.map +1 -1
- package/_esm/components/Header/WalletHeader.js +4 -11
- package/_esm/components/Header/WalletHeader.js.map +1 -1
- package/_esm/components/Header/WalletMenu.js +2 -2
- package/_esm/components/Header/WalletMenu.js.map +1 -1
- package/_esm/components/Insurance/types.d.ts +3 -3
- package/_esm/components/ListItem/ListItem.d.ts +1 -1
- package/_esm/components/PageContainer.d.ts +2 -1
- package/_esm/components/PageContainer.js +3 -3
- package/_esm/components/PageContainer.js.map +1 -1
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.js +2 -2
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.js.map +1 -1
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +9 -3
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.style.js +24 -14
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.style.js.map +1 -1
- package/_esm/components/RouteCard/RouteCard.js +2 -2
- package/_esm/components/RouteCard/RouteCard.js.map +1 -1
- package/_esm/components/RouteCard/RouteCardSkeleton.d.ts +2 -2
- package/_esm/components/RouteCard/RouteCardSkeleton.js +1 -1
- package/_esm/components/RouteCard/RouteCardSkeleton.js.map +1 -1
- package/_esm/components/Routes/Routes.d.ts +2 -2
- package/_esm/components/Routes/Routes.js +1 -1
- package/_esm/components/Routes/Routes.js.map +1 -1
- package/_esm/components/Routes/RoutesExpanded.js +9 -3
- package/_esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/_esm/components/Routes/RoutesExpanded.style.js +1 -0
- package/_esm/components/Routes/RoutesExpanded.style.js.map +1 -1
- package/_esm/components/SelectChainAndToken.js +3 -6
- package/_esm/components/SelectChainAndToken.js.map +1 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.js +9 -10
- package/_esm/components/SelectTokenButton/SelectTokenButton.js.map +1 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.d.ts +10 -0
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.js +41 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWalletButton.d.ts +2 -2
- package/_esm/components/SendToWallet/SendToWalletButton.js +2 -2
- package/_esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/_esm/components/Step/Step.js +8 -8
- package/_esm/components/Step/Step.js.map +1 -1
- package/_esm/components/Step/StepList.js +1 -1
- package/_esm/components/Step/StepList.js.map +1 -1
- package/_esm/components/StepActions/StepActions.d.ts +4 -9
- package/_esm/components/StepActions/StepActions.js +13 -12
- package/_esm/components/StepActions/StepActions.js.map +1 -1
- package/_esm/components/StepActions/types.d.ts +8 -2
- package/_esm/components/TokenList/TokenList.js +4 -1
- package/_esm/components/TokenList/TokenList.js.map +1 -1
- package/_esm/components/TokenList/TokenList.style.d.ts +1 -1
- package/_esm/components/TokenList/TokenList.style.js +1 -1
- package/_esm/components/TokenList/TokenList.style.js.map +1 -1
- package/_esm/components/TokenList/VirtualizedTokenList.js +19 -18
- package/_esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/_esm/components/TokenList/useTokenSelect.js +1 -1
- package/_esm/components/TokenList/useTokenSelect.js.map +1 -1
- package/_esm/components/TokenList/utils.d.ts +2 -0
- package/_esm/components/TokenList/utils.js +35 -0
- package/_esm/components/TokenList/utils.js.map +1 -0
- package/_esm/config/version.d.ts +1 -1
- package/_esm/config/version.js +1 -1
- package/_esm/hooks/useAddressValidation.d.ts +1 -1
- package/_esm/hooks/useGasRecommendation.d.ts +1 -1
- package/_esm/hooks/useProcessMessage.d.ts +2 -2
- package/_esm/hooks/useProcessMessage.js +16 -12
- package/_esm/hooks/useProcessMessage.js.map +1 -1
- package/_esm/hooks/useRoutes.d.ts +2 -2
- package/_esm/hooks/useRoutes.js +11 -20
- package/_esm/hooks/useRoutes.js.map +1 -1
- package/_esm/hooks/useTokenAddressBalance.d.ts +1 -1
- package/_esm/hooks/useTokenBalance.d.ts +1 -1
- package/_esm/hooks/useTokenBalances.d.ts +1 -1
- package/_esm/hooks/useWideVariant.d.ts +1 -0
- package/_esm/hooks/{useExpandableVariant.js → useWideVariant.js} +3 -3
- package/_esm/hooks/useWideVariant.js.map +1 -0
- package/_esm/i18n/en.json +9 -5
- package/_esm/i18n/index.js +14 -14
- package/_esm/i18n/index.js.map +1 -1
- package/_esm/index.d.ts +6 -3
- package/_esm/index.js +6 -3
- package/_esm/index.js.map +1 -1
- package/_esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +9 -2
- package/_esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js.map +1 -1
- package/_esm/pages/LanguagesPage.js +1 -0
- package/_esm/pages/LanguagesPage.js.map +1 -1
- package/_esm/pages/MainPage/MainPage.js +4 -4
- package/_esm/pages/MainPage/MainPage.js.map +1 -1
- package/_esm/pages/MainPage/ReviewButton.js +2 -2
- package/_esm/pages/MainPage/ReviewButton.js.map +1 -1
- package/_esm/pages/RoutesPage/RoutesPage.js +1 -8
- package/_esm/pages/RoutesPage/RoutesPage.js.map +1 -1
- package/_esm/pages/RoutesPage/RoutesPage.style.js +1 -1
- package/_esm/pages/SelectChainPage/SelectChainPage.js +1 -0
- package/_esm/pages/SelectChainPage/SelectChainPage.js.map +1 -1
- package/_esm/pages/SelectEnabledToolsPage.js +4 -2
- package/_esm/pages/SelectEnabledToolsPage.js.map +1 -1
- package/_esm/pages/SelectNativeTokenPage.js +1 -0
- package/_esm/pages/SelectNativeTokenPage.js.map +1 -1
- package/_esm/pages/SelectTokenPage/SearchTokenInput.js +2 -2
- package/_esm/pages/SelectTokenPage/SearchTokenInput.js.map +1 -1
- package/_esm/pages/SelectTokenPage/SelectTokenPage.js +1 -1
- package/_esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/_esm/pages/SelectWalletPage/SelectWalletPage.js +1 -0
- package/_esm/pages/SelectWalletPage/SelectWalletPage.js.map +1 -1
- package/_esm/pages/SendToWallet/BookmarkAddressSheet.js +1 -1
- package/_esm/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToConfiguredWalletPage.js +1 -1
- package/_esm/pages/SendToWallet/SendToConfiguredWalletPage.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.js +3 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.style.d.ts +2 -10
- package/_esm/pages/SendToWallet/SendToWalletPage.style.js +3 -2
- package/_esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +1 -1
- package/_esm/pages/SettingsPage/SettingsPage.js +1 -1
- package/_esm/pages/SettingsPage/SettingsPage.js.map +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +3 -3
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js.map +1 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryPage.js +6 -3
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryPage.js.map +1 -1
- package/_esm/pages/TransactionPage/StatusBottomSheet.d.ts +5 -0
- package/_esm/pages/TransactionPage/StatusBottomSheet.js +33 -21
- package/_esm/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
- package/_esm/pages/TransactionPage/TransactionPage.js +7 -7
- package/_esm/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/_esm/providers/ThemeProvider/ThemeProvider.js +1 -1
- package/_esm/providers/ThemeProvider/ThemeProvider.js.map +1 -1
- package/_esm/stores/StoreProvider.js +1 -1
- package/_esm/stores/StoreProvider.js.map +1 -1
- package/_esm/stores/form/createFormStore.js +1 -6
- package/_esm/stores/form/createFormStore.js.map +1 -1
- package/_esm/stores/form/types.d.ts +4 -6
- package/_esm/stores/form/types.js.map +1 -1
- package/_esm/stores/form/useFieldController.d.ts +1 -1
- package/_esm/stores/form/useFieldValues.js +1 -1
- package/_esm/stores/form/useFieldValues.js.map +1 -1
- package/_esm/stores/form/useTouchedFields.d.ts +1 -4
- package/_esm/stores/settings/types.d.ts +4 -4
- package/_esm/stores/settings/useSettings.d.ts +1 -1
- package/_esm/themes/createTheme.d.ts +3 -0
- package/_esm/themes/createTheme.js +356 -0
- package/_esm/themes/createTheme.js.map +1 -0
- package/_esm/themes/jumper.d.ts +2 -0
- package/_esm/themes/jumper.js +36 -0
- package/_esm/themes/jumper.js.map +1 -0
- package/_esm/themes/types.d.ts +49 -0
- package/_esm/themes/types.js +2 -0
- package/_esm/{components/NFT → themes}/types.js.map +1 -1
- package/_esm/themes/utils.d.ts +4 -0
- package/_esm/themes/utils.js +9 -0
- package/_esm/themes/utils.js.map +1 -0
- package/_esm/themes/windows95.d.ts +2 -0
- package/_esm/themes/windows95.js +92 -0
- package/_esm/themes/windows95.js.map +1 -0
- package/_esm/types/events.d.ts +3 -1
- package/_esm/types/events.js +1 -0
- package/_esm/types/events.js.map +1 -1
- package/_esm/types/widget.d.ts +40 -27
- package/_esm/types/widget.js.map +1 -1
- package/_esm/utils/item.d.ts +1 -1
- package/components/ActiveTransactions/ActiveTransactions.tsx +3 -3
- package/components/AmountInput/AmountInput.tsx +6 -6
- package/components/AppContainer.tsx +2 -2
- package/components/Avatar/AccountAvatar.tsx +21 -17
- package/components/Avatar/utils.ts +1 -1
- package/components/Card/Card.tsx +45 -74
- package/components/Card/CardLabel.tsx +15 -3
- package/components/Card/InputCard.tsx +7 -0
- package/components/ChainSelect/ChainSelect.tsx +6 -2
- package/components/ContractComponent/ContractComponent.tsx +2 -2
- package/components/ContractComponent/ItemPrice.tsx +33 -0
- package/components/{NFT → ContractComponent/NFT}/NFT.tsx +5 -11
- package/components/{NFT → ContractComponent/NFT}/NFTBase.tsx +1 -1
- package/components/{NFT → ContractComponent/NFT}/types.ts +2 -3
- package/components/Dialog.tsx +3 -2
- package/components/Header/BackButton.tsx +17 -0
- package/components/Header/CloseDrawerButton.tsx +16 -3
- package/components/Header/Header.style.ts +25 -16
- package/components/Header/NavigationHeader.tsx +8 -11
- package/components/Header/NavigationTabs.tsx +1 -1
- package/components/Header/TransactionHistoryButton.tsx +0 -1
- package/components/Header/WalletHeader.tsx +5 -12
- package/components/Header/WalletMenu.tsx +2 -2
- package/components/Insurance/types.ts +3 -3
- package/components/PageContainer.ts +6 -5
- package/components/ReverseTokensButton/ReverseTokensButton.style.tsx +26 -21
- package/components/ReverseTokensButton/ReverseTokensButton.tsx +10 -8
- package/components/RouteCard/RouteCard.tsx +2 -2
- package/components/RouteCard/RouteCardSkeleton.tsx +5 -6
- package/components/Routes/Routes.tsx +3 -3
- package/components/Routes/RoutesExpanded.style.ts +1 -0
- package/components/Routes/RoutesExpanded.tsx +11 -4
- package/components/SelectChainAndToken.tsx +7 -13
- package/components/SelectTokenButton/SelectTokenButton.style.tsx +51 -1
- package/components/SelectTokenButton/SelectTokenButton.tsx +43 -38
- package/components/SendToWallet/SendToWalletButton.tsx +8 -8
- package/components/Step/Step.tsx +8 -8
- package/components/Step/StepList.tsx +1 -1
- package/components/StepActions/StepActions.tsx +40 -21
- package/components/StepActions/types.ts +12 -2
- package/components/TokenList/TokenList.style.tsx +1 -1
- package/components/TokenList/TokenList.tsx +9 -6
- package/components/TokenList/VirtualizedTokenList.tsx +26 -20
- package/components/TokenList/useTokenSelect.ts +1 -1
- package/components/TokenList/utils.ts +42 -0
- package/config/version.ts +1 -1
- package/hooks/useProcessMessage.ts +38 -15
- package/hooks/useRoutes.ts +13 -30
- package/hooks/{useExpandableVariant.ts → useWideVariant.ts} +2 -2
- package/i18n/en.json +9 -5
- package/i18n/index.ts +14 -14
- package/index.ts +6 -3
- package/package.json +15 -15
- package/pages/ActiveTransactionsPage/ActiveTransactionsPage.tsx +20 -5
- package/pages/LanguagesPage.tsx +1 -0
- package/pages/MainPage/MainPage.tsx +12 -10
- package/pages/MainPage/ReviewButton.tsx +2 -2
- package/pages/RoutesPage/RoutesPage.style.ts +1 -1
- package/pages/RoutesPage/RoutesPage.tsx +1 -9
- package/pages/SelectChainPage/SelectChainPage.tsx +1 -0
- package/pages/SelectEnabledToolsPage.tsx +8 -1
- package/pages/SelectNativeTokenPage.tsx +1 -0
- package/pages/SelectTokenPage/SearchTokenInput.tsx +3 -3
- package/pages/SelectTokenPage/SelectTokenPage.tsx +1 -1
- package/pages/SelectWalletPage/SelectWalletPage.tsx +1 -0
- package/pages/SendToWallet/BookmarkAddressSheet.tsx +2 -4
- package/pages/SendToWallet/SendToConfiguredWalletPage.tsx +1 -0
- package/pages/SendToWallet/SendToWalletPage.style.tsx +3 -2
- package/pages/SendToWallet/SendToWalletPage.tsx +7 -2
- package/pages/SettingsPage/SettingsPage.tsx +1 -1
- package/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +7 -8
- package/pages/TransactionDetailsPage/TransactionDetailsSkeleton.tsx +1 -1
- package/pages/TransactionHistoryPage/TransactionHistoryPage.tsx +19 -16
- package/pages/TransactionPage/StatusBottomSheet.tsx +101 -78
- package/pages/TransactionPage/TransactionPage.tsx +12 -16
- package/providers/ThemeProvider/ThemeProvider.tsx +1 -1
- package/stores/StoreProvider.tsx +1 -1
- package/stores/form/createFormStore.ts +1 -6
- package/stores/form/types.ts +4 -6
- package/stores/form/useFieldValues.ts +1 -1
- package/stores/settings/types.ts +4 -4
- package/themes/createTheme.ts +416 -0
- package/themes/jumper.ts +37 -0
- package/themes/types.ts +63 -0
- package/themes/utils.ts +18 -0
- package/themes/windows95.ts +98 -0
- package/types/events.ts +2 -0
- package/types/widget.ts +54 -32
- package/_esm/components/NFT/NFT.js.map +0 -1
- package/_esm/components/NFT/NFT.style.js.map +0 -1
- package/_esm/components/NFT/NFTBase.js.map +0 -1
- package/_esm/config/theme.d.ts +0 -27
- package/_esm/config/theme.js +0 -250
- package/_esm/config/theme.js.map +0 -1
- package/_esm/hooks/useExpandableVariant.d.ts +0 -1
- package/_esm/hooks/useExpandableVariant.js.map +0 -1
- package/config/theme.ts +0 -321
- /package/_esm/components/{NFT → ContractComponent/NFT}/NFT.d.ts +0 -0
- /package/_esm/components/{NFT → ContractComponent/NFT}/NFT.style.d.ts +0 -0
- /package/_esm/components/{NFT → ContractComponent/NFT}/NFT.style.js +0 -0
- /package/_esm/components/{NFT → ContractComponent/NFT}/NFTBase.d.ts +0 -0
- /package/_esm/components/{NFT → ContractComponent/NFT}/types.js +0 -0
- /package/components/{NFT → ContractComponent/NFT}/NFT.style.ts +0 -0
package/hooks/useRoutes.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Route, RoutesResponse, Token } from '@lifi/sdk';
|
|
2
|
-
import { LiFiErrorCode,
|
|
2
|
+
import { LiFiErrorCode, getContractCallsQuote, getRoutes } from '@lifi/sdk';
|
|
3
3
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
5
|
import { parseUnits } from 'viem';
|
|
@@ -45,20 +45,16 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
45
45
|
toAddress,
|
|
46
46
|
toTokenAmount,
|
|
47
47
|
toChainId,
|
|
48
|
-
toContractAddress,
|
|
49
|
-
toContractCallData,
|
|
50
|
-
toContractGasLimit,
|
|
51
48
|
toTokenAddress,
|
|
49
|
+
contractCalls,
|
|
52
50
|
] = useFieldValues(
|
|
53
51
|
'fromChain',
|
|
54
52
|
'fromToken',
|
|
55
53
|
'toAddress',
|
|
56
54
|
'toAmount',
|
|
57
55
|
'toChain',
|
|
58
|
-
'toContractAddress',
|
|
59
|
-
'toContractCallData',
|
|
60
|
-
'toContractGasLimit',
|
|
61
56
|
'toToken',
|
|
57
|
+
'contractCalls',
|
|
62
58
|
);
|
|
63
59
|
const { token: fromToken } = useToken(fromChainId, fromTokenAddress);
|
|
64
60
|
const { token: toToken } = useToken(toChainId, toTokenAddress);
|
|
@@ -72,19 +68,12 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
72
68
|
const hasAmount = Number(fromTokenAmount) > 0 || Number(toTokenAmount) > 0;
|
|
73
69
|
|
|
74
70
|
const contractCallQuoteEnabled: boolean =
|
|
75
|
-
subvariant === '
|
|
76
|
-
? Boolean(
|
|
77
|
-
toContractAddress &&
|
|
78
|
-
toContractCallData &&
|
|
79
|
-
toContractGasLimit &&
|
|
80
|
-
account.address,
|
|
81
|
-
)
|
|
82
|
-
: true;
|
|
71
|
+
subvariant === 'custom' ? Boolean(contractCalls && account.address) : true;
|
|
83
72
|
|
|
84
73
|
// If toAddress is set, it must have the same chainType as toChain
|
|
85
|
-
const hasToAddressAndChainTypeSatisfied =
|
|
86
|
-
toChain &&
|
|
87
|
-
|
|
74
|
+
const hasToAddressAndChainTypeSatisfied: boolean =
|
|
75
|
+
!!toChain &&
|
|
76
|
+
!!toAddress &&
|
|
88
77
|
getChainTypeFromAddress(toAddress) === toChain.chainType;
|
|
89
78
|
// We need to check for toAddress only if it is set
|
|
90
79
|
const isToAddressSatisfied = toAddress
|
|
@@ -118,9 +107,7 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
118
107
|
toChainId as number,
|
|
119
108
|
toToken?.address as string,
|
|
120
109
|
toTokenAmount,
|
|
121
|
-
|
|
122
|
-
toContractCallData,
|
|
123
|
-
toContractGasLimit,
|
|
110
|
+
contractCalls,
|
|
124
111
|
slippage,
|
|
125
112
|
swapOnly,
|
|
126
113
|
disabledBridges,
|
|
@@ -148,9 +135,7 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
148
135
|
toChainId,
|
|
149
136
|
toTokenAddress,
|
|
150
137
|
toTokenAmount,
|
|
151
|
-
|
|
152
|
-
toContractCallData,
|
|
153
|
-
toContractGasLimit,
|
|
138
|
+
contractCalls,
|
|
154
139
|
slippage = defaultSlippage,
|
|
155
140
|
swapOnly,
|
|
156
141
|
disabledBridges,
|
|
@@ -196,8 +181,8 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
196
181
|
)
|
|
197
182
|
: undefined;
|
|
198
183
|
|
|
199
|
-
if (subvariant === '
|
|
200
|
-
const contractCallQuote = await
|
|
184
|
+
if (subvariant === 'custom' && contractCalls && toTokenAmount) {
|
|
185
|
+
const contractCallQuote = await getContractCallsQuote(
|
|
201
186
|
{
|
|
202
187
|
// Contract calls are enabled only when fromAddress is set
|
|
203
188
|
fromAddress: fromAddress as string,
|
|
@@ -206,9 +191,7 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
206
191
|
toAmount: toTokenAmount,
|
|
207
192
|
toChain: toChainId,
|
|
208
193
|
toToken: toTokenAddress,
|
|
209
|
-
|
|
210
|
-
toContractCallData,
|
|
211
|
-
toContractGasLimit,
|
|
194
|
+
contractCalls,
|
|
212
195
|
denyBridges: disabledBridges.length ? disabledBridges : undefined,
|
|
213
196
|
denyExchanges: disabledExchanges.length
|
|
214
197
|
? disabledExchanges
|
|
@@ -224,7 +207,7 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
224
207
|
contractCallQuote.action.toToken = toToken!;
|
|
225
208
|
|
|
226
209
|
const customStep =
|
|
227
|
-
subvariant === '
|
|
210
|
+
subvariant === 'custom'
|
|
228
211
|
? contractCallQuote.includedSteps?.find(
|
|
229
212
|
(step) => step.type === 'custom',
|
|
230
213
|
)
|
|
@@ -4,10 +4,10 @@ import { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js';
|
|
|
4
4
|
|
|
5
5
|
const defaultExpandableWidth = 852;
|
|
6
6
|
|
|
7
|
-
export const
|
|
7
|
+
export const useWideVariant = () => {
|
|
8
8
|
const { variant, useRecommendedRoute } = useWidgetConfig();
|
|
9
9
|
const expandableAllowed = useMediaQuery((theme: Theme) =>
|
|
10
10
|
theme.breakpoints.up(defaultExpandableWidth),
|
|
11
11
|
);
|
|
12
|
-
return variant === '
|
|
12
|
+
return variant === 'wide' && expandableAllowed && !useRecommendedRoute;
|
|
13
13
|
};
|
package/i18n/en.json
CHANGED
|
@@ -171,8 +171,10 @@
|
|
|
171
171
|
},
|
|
172
172
|
"main": {
|
|
173
173
|
"allTokens": "All tokens",
|
|
174
|
-
"
|
|
174
|
+
"bridgeStepDetails": "Bridge from {{from}} to {{to}} via {{tool}}",
|
|
175
|
+
"checkoutStepDetails": "Purchase via {{tool}}",
|
|
175
176
|
"currentAmount": "Current amount",
|
|
177
|
+
"depositStepDetails": "Deposit via {{tool}}",
|
|
176
178
|
"featuredTokens": "Featured tokens",
|
|
177
179
|
"fees": {
|
|
178
180
|
"estimated": "estimated fees",
|
|
@@ -187,19 +189,21 @@
|
|
|
187
189
|
"gasCost": "Gas cost",
|
|
188
190
|
"inProgress": "in progress",
|
|
189
191
|
"myTokens": "My tokens",
|
|
190
|
-
"nftStepDetails": "Purchase NFT via {{tool}}",
|
|
191
192
|
"onChain": "on {{chainName}}",
|
|
192
193
|
"ownedBy": "Owned by",
|
|
193
194
|
"popularTokens": "Popular tokens",
|
|
194
195
|
"process": {
|
|
195
|
-
"
|
|
196
|
+
"bridge": {
|
|
196
197
|
"actionRequired": "Please sign the transaction",
|
|
197
198
|
"done": "Bridge transaction confirmed",
|
|
198
199
|
"pending": "Waiting for bridge transaction",
|
|
199
200
|
"started": "Preparing bridge transaction"
|
|
200
201
|
},
|
|
201
|
-
"
|
|
202
|
-
"done": "
|
|
202
|
+
"checkout": {
|
|
203
|
+
"done": "Purchase completed"
|
|
204
|
+
},
|
|
205
|
+
"deposit": {
|
|
206
|
+
"done": "Deposit completed"
|
|
203
207
|
},
|
|
204
208
|
"receivingChain": {
|
|
205
209
|
"done": "Bridge completed",
|
package/i18n/index.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import bn from './bn.json'
|
|
2
|
-
import de from './de.json'
|
|
3
|
-
import en from './en.json'
|
|
4
|
-
import es from './es.json'
|
|
5
|
-
import fr from './fr.json'
|
|
6
|
-
import id from './id.json'
|
|
7
|
-
import it from './it.json'
|
|
8
|
-
import ko from './ko.json'
|
|
9
|
-
import pt from './pt.json'
|
|
10
|
-
import th from './th.json'
|
|
11
|
-
import tr from './tr.json'
|
|
12
|
-
import uk from './uk.json'
|
|
13
|
-
import vi from './vi.json'
|
|
14
|
-
import zh from './zh.json'
|
|
1
|
+
import bn from './bn.json';
|
|
2
|
+
import de from './de.json';
|
|
3
|
+
import en from './en.json';
|
|
4
|
+
import es from './es.json';
|
|
5
|
+
import fr from './fr.json';
|
|
6
|
+
import id from './id.json';
|
|
7
|
+
import it from './it.json';
|
|
8
|
+
import ko from './ko.json';
|
|
9
|
+
import pt from './pt.json';
|
|
10
|
+
import th from './th.json';
|
|
11
|
+
import tr from './tr.json';
|
|
12
|
+
import uk from './uk.json';
|
|
13
|
+
import vi from './vi.json';
|
|
14
|
+
import zh from './zh.json';
|
|
15
15
|
|
|
16
16
|
export { bn, de, en, es, fr, id, it, ko, pt, th, tr, uk, vi, zh };
|
package/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { App as LiFiWidget } from './App.js';
|
|
2
2
|
export type { WidgetDrawer } from './AppDrawer.js';
|
|
3
|
-
export * from './components/
|
|
4
|
-
export * from './components/NFT/
|
|
5
|
-
export * from './components/NFT/
|
|
3
|
+
export * from './components/ContractComponent/ItemPrice.js';
|
|
4
|
+
export * from './components/ContractComponent/NFT/NFT.js';
|
|
5
|
+
export * from './components/ContractComponent/NFT/NFTBase.js';
|
|
6
|
+
export * from './components/ContractComponent/NFT/types.js';
|
|
6
7
|
export * from './config/version.js';
|
|
7
8
|
export { useAccount } from './hooks/useAccount.js';
|
|
8
9
|
export { useAvailableChains } from './hooks/useAvailableChains.js';
|
|
@@ -11,6 +12,8 @@ export { formatChain } from './providers/WalletProvider/utils.js';
|
|
|
11
12
|
export * from './stores/form/types.js';
|
|
12
13
|
export { useFieldActions } from './stores/form/useFieldActions.js';
|
|
13
14
|
export { useFieldValues } from './stores/form/useFieldValues.js';
|
|
15
|
+
export { jumperTheme } from './themes/jumper.js';
|
|
16
|
+
export { windows95Theme } from './themes/windows95.js';
|
|
14
17
|
export * from './types/events.js';
|
|
15
18
|
export * from './types/token.js';
|
|
16
19
|
export * from './types/widget.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lifi/widget",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.35",
|
|
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
|
"type": "module",
|
|
6
6
|
"main": "./_esm/index.js",
|
|
@@ -34,30 +34,30 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@emotion/react": "^11.11.4",
|
|
36
36
|
"@emotion/styled": "^11.11.0",
|
|
37
|
-
"@lifi/sdk": "^3.0.0-alpha.
|
|
38
|
-
"@lifi/wallet-management": "^3.0.0-alpha.
|
|
39
|
-
"@mui/icons-material": "^5.15.
|
|
40
|
-
"@mui/lab": "^5.0.0-alpha.
|
|
41
|
-
"@mui/material": "^5.15.
|
|
37
|
+
"@lifi/sdk": "^3.0.0-alpha.57",
|
|
38
|
+
"@lifi/wallet-management": "^3.0.0-alpha.23",
|
|
39
|
+
"@mui/icons-material": "^5.15.12",
|
|
40
|
+
"@mui/lab": "^5.0.0-alpha.167",
|
|
41
|
+
"@mui/material": "^5.15.12",
|
|
42
42
|
"@solana/wallet-adapter-base": "^0.9.23",
|
|
43
43
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
44
|
-
"@solana/wallet-adapter-wallets": "^0.19.
|
|
45
|
-
"@solana/web3.js": "^1.
|
|
46
|
-
"@tanstack/react-query": "^5.
|
|
44
|
+
"@solana/wallet-adapter-wallets": "^0.19.31",
|
|
45
|
+
"@solana/web3.js": "^1.91.0",
|
|
46
|
+
"@tanstack/react-query": "^5.27.5",
|
|
47
47
|
"@tanstack/react-virtual": "^3.1.3",
|
|
48
|
-
"i18next": "^23.10.
|
|
48
|
+
"i18next": "^23.10.1",
|
|
49
49
|
"microdiff": "^1.3.2",
|
|
50
50
|
"mitt": "^3.0.1",
|
|
51
51
|
"react": "^18.2.0",
|
|
52
52
|
"react-dom": "^18.2.0",
|
|
53
|
-
"react-i18next": "^14.0
|
|
53
|
+
"react-i18next": "^14.1.0",
|
|
54
54
|
"react-intersection-observer": "^9.8.1",
|
|
55
|
-
"react-router-dom": "^6.22.
|
|
55
|
+
"react-router-dom": "^6.22.3",
|
|
56
56
|
"react-timer-hook": "^3.0.7",
|
|
57
57
|
"uuid": "^9.0.1",
|
|
58
|
-
"viem": "^2.
|
|
59
|
-
"wagmi": "2.5.
|
|
60
|
-
"zustand": "^4.5.
|
|
58
|
+
"viem": "^2.8.4",
|
|
59
|
+
"wagmi": "^2.5.8",
|
|
60
|
+
"zustand": "^4.5.2"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@tanstack/react-query": "^5.17.0",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DeleteOutline } from '@mui/icons-material';
|
|
2
|
+
import type { IconButtonProps } from '@mui/material';
|
|
2
3
|
import {
|
|
3
4
|
Button,
|
|
4
5
|
DialogActions,
|
|
@@ -7,6 +8,7 @@ import {
|
|
|
7
8
|
DialogTitle,
|
|
8
9
|
IconButton,
|
|
9
10
|
List,
|
|
11
|
+
useTheme,
|
|
10
12
|
} from '@mui/material';
|
|
11
13
|
import { useCallback, useEffect, useState } from 'react';
|
|
12
14
|
import { useTranslation } from 'react-i18next';
|
|
@@ -18,6 +20,20 @@ import { useRouteExecutionStore } from '../../stores/routes/RouteExecutionStore.
|
|
|
18
20
|
import { useExecutingRoutesIds } from '../../stores/routes/useExecutingRoutesIds.js';
|
|
19
21
|
import { ActiveTransactionsEmpty } from './ActiveTransactionsEmpty.js';
|
|
20
22
|
|
|
23
|
+
const DeleteIconButton: React.FC<IconButtonProps> = ({ onClick }) => {
|
|
24
|
+
const theme = useTheme();
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<IconButton
|
|
28
|
+
size="medium"
|
|
29
|
+
edge={theme?.navigation?.edge ? 'end' : false}
|
|
30
|
+
onClick={onClick}
|
|
31
|
+
>
|
|
32
|
+
<DeleteOutline />
|
|
33
|
+
</IconButton>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
21
37
|
export const ActiveTransactionsPage = () => {
|
|
22
38
|
const { t } = useTranslation();
|
|
23
39
|
const executingRoutes = useExecutingRoutesIds();
|
|
@@ -31,11 +47,9 @@ export const ActiveTransactionsPage = () => {
|
|
|
31
47
|
|
|
32
48
|
useEffect(() => {
|
|
33
49
|
if (executingRoutes.length) {
|
|
34
|
-
return headerStoreContext
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</IconButton>,
|
|
38
|
-
);
|
|
50
|
+
return headerStoreContext
|
|
51
|
+
.getState()
|
|
52
|
+
.setAction(<DeleteIconButton onClick={toggleDialog} />);
|
|
39
53
|
}
|
|
40
54
|
}, [executingRoutes.length, headerStoreContext, toggleDialog]);
|
|
41
55
|
|
|
@@ -47,6 +61,7 @@ export const ActiveTransactionsPage = () => {
|
|
|
47
61
|
<PageContainer disableGutters>
|
|
48
62
|
<List
|
|
49
63
|
sx={{
|
|
64
|
+
paddingTop: 0,
|
|
50
65
|
paddingLeft: 1.5,
|
|
51
66
|
paddingRight: 1.5,
|
|
52
67
|
paddingBottom: 1.5,
|
package/pages/LanguagesPage.tsx
CHANGED
|
@@ -9,30 +9,32 @@ import { Routes } from '../../components/Routes/Routes.js';
|
|
|
9
9
|
import { SelectChainAndToken } from '../../components/SelectChainAndToken.js';
|
|
10
10
|
import { SendToWalletButton } from '../../components/SendToWallet/SendToWalletButton.js';
|
|
11
11
|
import { SendToWalletExpandButton } from '../../components/SendToWallet/SendToWalletExpandButton.js';
|
|
12
|
-
import {
|
|
12
|
+
import { useWideVariant } from '../../hooks/useWideVariant.js';
|
|
13
13
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js';
|
|
14
14
|
import { HiddenUI } from '../../types/widget.js';
|
|
15
15
|
import { MainGasMessage } from './MainGasMessage.js';
|
|
16
16
|
import { ReviewButton } from './ReviewButton.js';
|
|
17
17
|
|
|
18
18
|
export const MainPage: React.FC = () => {
|
|
19
|
-
const
|
|
19
|
+
const wideVariant = useWideVariant();
|
|
20
20
|
const { subvariant, contractComponent, hiddenUI } = useWidgetConfig();
|
|
21
|
-
const
|
|
21
|
+
const custom = subvariant === 'custom';
|
|
22
22
|
const showPoweredBy = !hiddenUI?.includes(HiddenUI.PoweredBy);
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<PageContainer>
|
|
26
|
-
<ActiveTransactions
|
|
27
|
-
{
|
|
28
|
-
<ContractComponent
|
|
26
|
+
<ActiveTransactions sx={{ marginBottom: 2 }} />
|
|
27
|
+
{custom ? (
|
|
28
|
+
<ContractComponent sx={{ marginBottom: 2 }}>
|
|
29
29
|
{contractComponent}
|
|
30
30
|
</ContractComponent>
|
|
31
31
|
) : null}
|
|
32
|
-
<SelectChainAndToken
|
|
33
|
-
{!
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
<SelectChainAndToken mb={2} />
|
|
33
|
+
{!custom ? (
|
|
34
|
+
<AmountInput formType="from" sx={{ marginBottom: 2 }} />
|
|
35
|
+
) : null}
|
|
36
|
+
{!wideVariant ? <Routes sx={{ marginBottom: 2 }} /> : null}
|
|
37
|
+
<SendToWalletButton sx={{ marginBottom: 2 }} />
|
|
36
38
|
<GasRefuelMessage mb={2} />
|
|
37
39
|
<MainGasMessage mb={2} />
|
|
38
40
|
<Box display="flex" mb={showPoweredBy ? 1 : 3} gap={1.5}>
|
|
@@ -33,7 +33,7 @@ export const ReviewButton: React.FC = () => {
|
|
|
33
33
|
const getButtonText = (): string => {
|
|
34
34
|
if (currentRoute) {
|
|
35
35
|
switch (subvariant) {
|
|
36
|
-
case '
|
|
36
|
+
case 'custom':
|
|
37
37
|
return t(`button.reviewPurchase`);
|
|
38
38
|
case 'refuel':
|
|
39
39
|
return t(`button.reviewBridge`);
|
|
@@ -46,7 +46,7 @@ export const ReviewButton: React.FC = () => {
|
|
|
46
46
|
}
|
|
47
47
|
} else {
|
|
48
48
|
switch (subvariant) {
|
|
49
|
-
case '
|
|
49
|
+
case 'custom':
|
|
50
50
|
return t(`button.buy`);
|
|
51
51
|
case 'refuel':
|
|
52
52
|
return t(`button.getGas`);
|
|
@@ -14,7 +14,7 @@ import { navigationRoutes } from '../../utils/navigationRoutes.js';
|
|
|
14
14
|
import { Stack } from './RoutesPage.style.js';
|
|
15
15
|
|
|
16
16
|
export const RoutesPage: React.FC<BoxProps> = () => {
|
|
17
|
-
const {
|
|
17
|
+
const { navigate } = useNavigateBack();
|
|
18
18
|
const { routes, isLoading, isFetching, dataUpdatedAt, refetchTime, refetch } =
|
|
19
19
|
useRoutes();
|
|
20
20
|
const setExecutableRoute = useSetExecutableRoute();
|
|
@@ -27,14 +27,6 @@ export const RoutesPage: React.FC<BoxProps> = () => {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
if (!routes?.length && !isLoading && !isFetching) {
|
|
32
|
-
navigateBack();
|
|
33
|
-
}
|
|
34
|
-
// redirect to the home page if no routes are found on page reload
|
|
35
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
-
}, []);
|
|
37
|
-
|
|
38
30
|
useEffect(() => {
|
|
39
31
|
return headerStoreContext
|
|
40
32
|
.getState()
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
List,
|
|
11
11
|
ListItemAvatar,
|
|
12
12
|
Tooltip,
|
|
13
|
+
useTheme,
|
|
13
14
|
} from '@mui/material';
|
|
14
15
|
import type { MouseEventHandler } from 'react';
|
|
15
16
|
import { useEffect } from 'react';
|
|
@@ -34,13 +35,18 @@ const SelectAllCheckbox: React.FC<SelectAllCheckboxProps> = ({
|
|
|
34
35
|
onClick,
|
|
35
36
|
}) => {
|
|
36
37
|
const { t } = useTranslation();
|
|
38
|
+
const theme = useTheme();
|
|
37
39
|
const tooltipTitle = allCheckboxesSelected
|
|
38
40
|
? t('tooltip.deselectAll')
|
|
39
41
|
: t('tooltip.selectAll');
|
|
40
42
|
|
|
41
43
|
return (
|
|
42
44
|
<Tooltip title={tooltipTitle} arrow>
|
|
43
|
-
<IconButton
|
|
45
|
+
<IconButton
|
|
46
|
+
size="medium"
|
|
47
|
+
edge={theme?.navigation?.edge ? 'end' : false}
|
|
48
|
+
onClick={onClick}
|
|
49
|
+
>
|
|
44
50
|
{allCheckboxesSelected ? (
|
|
45
51
|
<CheckBoxOutlined />
|
|
46
52
|
) : anyCheckboxesSelected ? (
|
|
@@ -90,6 +96,7 @@ export const SelectEnabledToolsPage: React.FC<{
|
|
|
90
96
|
<PageContainer disableGutters>
|
|
91
97
|
<List
|
|
92
98
|
sx={{
|
|
99
|
+
paddingTop: 0,
|
|
93
100
|
paddingLeft: 1.5,
|
|
94
101
|
paddingRight: 1.5,
|
|
95
102
|
paddingBottom: 1.5,
|
|
@@ -2,7 +2,7 @@ import { Search } from '@mui/icons-material';
|
|
|
2
2
|
import { FormControl, InputAdornment } from '@mui/material';
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import {
|
|
5
|
+
import { InputCard } from '../../components/Card/InputCard.js';
|
|
6
6
|
import { useFieldActions } from '../../stores/form/useFieldActions.js';
|
|
7
7
|
import { useFieldController } from '../../stores/form/useFieldController.js';
|
|
8
8
|
import { Input } from './SearchTokenInput.style.js';
|
|
@@ -22,7 +22,7 @@ export const SearchTokenInput = () => {
|
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
<
|
|
25
|
+
<InputCard>
|
|
26
26
|
<FormControl fullWidth>
|
|
27
27
|
<Input
|
|
28
28
|
size="small"
|
|
@@ -43,6 +43,6 @@ export const SearchTokenInput = () => {
|
|
|
43
43
|
autoComplete="off"
|
|
44
44
|
/>
|
|
45
45
|
</FormControl>
|
|
46
|
-
</
|
|
46
|
+
</InputCard>
|
|
47
47
|
);
|
|
48
48
|
};
|
|
@@ -34,7 +34,7 @@ export const SelectTokenPage: FC<FormTypeProps> = ({ formType }) => {
|
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
36
|
<PageContainer disableGutters>
|
|
37
|
-
<Box
|
|
37
|
+
<Box pb={2} px={3} ref={headerRef}>
|
|
38
38
|
{!hideChainSelect ? <ChainSelect formType={formType} /> : null}
|
|
39
39
|
<Box mt={!hideChainSelect ? 2 : 0}>
|
|
40
40
|
<SearchTokenInput />
|
|
@@ -157,9 +157,7 @@ export const BookmarkAddressSheet = forwardRef<
|
|
|
157
157
|
</SheetAddressContainer>
|
|
158
158
|
) : null}
|
|
159
159
|
<BookmarkInputFields>
|
|
160
|
-
<SendToWalletCard
|
|
161
|
-
variant={error?.type === 'name' ? 'error' : 'default'}
|
|
162
|
-
>
|
|
160
|
+
<SendToWalletCard type={error?.type === 'name' ? 'error' : 'default'}>
|
|
163
161
|
<Input
|
|
164
162
|
size="small"
|
|
165
163
|
autoComplete="off"
|
|
@@ -175,7 +173,7 @@ export const BookmarkAddressSheet = forwardRef<
|
|
|
175
173
|
</SendToWalletCard>
|
|
176
174
|
{!validatedWallet && (
|
|
177
175
|
<SendToWalletCard
|
|
178
|
-
|
|
176
|
+
type={error?.type === 'address' ? 'error' : 'default'}
|
|
179
177
|
>
|
|
180
178
|
<AddressInput
|
|
181
179
|
size="small"
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
styled,
|
|
10
10
|
} from '@mui/material';
|
|
11
11
|
import { ButtonTertiary } from '../../components/ButtonTertiary.js';
|
|
12
|
-
import {
|
|
12
|
+
import { InputCard } from '../../components/Card/InputCard.js';
|
|
13
13
|
import { Input } from '../../components/Input.js';
|
|
14
14
|
import type { PageContainerProps } from '../../components/PageContainer.js';
|
|
15
15
|
import { PageContainer } from '../../components/PageContainer.js';
|
|
@@ -38,7 +38,7 @@ export const SendToWalletPageContainer = styled(
|
|
|
38
38
|
gap: theme.spacing(1),
|
|
39
39
|
}));
|
|
40
40
|
|
|
41
|
-
export const SendToWalletCard = styled(
|
|
41
|
+
export const SendToWalletCard = styled(InputCard)({
|
|
42
42
|
display: 'flex',
|
|
43
43
|
flexDirection: 'column',
|
|
44
44
|
});
|
|
@@ -93,6 +93,7 @@ export const ListContainer = styled(List)(({ theme }) => ({
|
|
|
93
93
|
display: 'flex',
|
|
94
94
|
flexDirection: 'column',
|
|
95
95
|
minHeight: 400,
|
|
96
|
+
paddingTop: 0,
|
|
96
97
|
paddingBottom: theme.spacing(1.5),
|
|
97
98
|
}));
|
|
98
99
|
|
|
@@ -178,8 +178,13 @@ export const SendToWalletPage = () => {
|
|
|
178
178
|
});
|
|
179
179
|
|
|
180
180
|
return (
|
|
181
|
-
<SendToWalletPageContainer
|
|
182
|
-
<SendToWalletCard
|
|
181
|
+
<SendToWalletPageContainer bottomGutters>
|
|
182
|
+
<SendToWalletCard
|
|
183
|
+
type={errorMessage ? 'error' : 'default'}
|
|
184
|
+
sx={{
|
|
185
|
+
marginBottom: 6,
|
|
186
|
+
}}
|
|
187
|
+
>
|
|
183
188
|
<AddressInput
|
|
184
189
|
size="small"
|
|
185
190
|
autoComplete="off"
|