@lifi/widget 4.0.0-beta.9 → 4.1.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/README.md +200 -16
- package/dist/esm/App.d.ts +11 -3
- package/dist/esm/App.d.ts.map +1 -0
- package/dist/esm/App.js +43 -25
- package/dist/esm/App.js.map +1 -1
- package/dist/esm/AppDefault.js +151 -171
- package/dist/esm/AppDefault.js.map +1 -1
- package/dist/esm/AppDrawer.d.ts +11 -9
- package/dist/esm/AppDrawer.d.ts.map +1 -0
- package/dist/esm/AppDrawer.js +61 -51
- package/dist/esm/AppDrawer.js.map +1 -1
- package/dist/esm/AppDrawerContext.js +7 -3
- package/dist/esm/AppDrawerContext.js.map +1 -1
- package/dist/esm/AppLayout.js +31 -17
- package/dist/esm/AppLayout.js.map +1 -1
- package/dist/esm/AppProvider.js +28 -11
- package/dist/esm/AppProvider.js.map +1 -1
- package/dist/esm/components/ActionRow/ActionRow.js +17 -0
- package/dist/esm/components/ActionRow/ActionRow.js.map +1 -0
- package/dist/esm/components/ActionRow/ActionRow.style.js +21 -0
- package/dist/esm/components/ActionRow/ActionRow.style.js.map +1 -0
- package/dist/esm/components/AmountInput/AmountInput.js +114 -111
- package/dist/esm/components/AmountInput/AmountInput.js.map +1 -1
- package/dist/esm/components/AmountInput/AmountInput.style.js +34 -42
- package/dist/esm/components/AmountInput/AmountInput.style.js.map +1 -1
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.js +62 -53
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.js.map +1 -1
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.style.js +21 -0
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.style.js.map +1 -0
- package/dist/esm/components/AmountInput/AmountInputStartAdornment.js +19 -13
- package/dist/esm/components/AmountInput/AmountInputStartAdornment.js.map +1 -1
- package/dist/esm/components/AmountInput/PriceFormHelperText.js +94 -69
- package/dist/esm/components/AmountInput/PriceFormHelperText.js.map +1 -1
- package/dist/esm/components/AmountInput/PriceFormHelperText.style.js +26 -30
- package/dist/esm/components/AmountInput/PriceFormHelperText.style.js.map +1 -1
- package/dist/esm/components/AppContainer.js +88 -111
- package/dist/esm/components/AppContainer.js.map +1 -1
- package/dist/esm/components/Avatar/AccountAvatar.js +27 -11
- package/dist/esm/components/Avatar/AccountAvatar.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.js +42 -10
- package/dist/esm/components/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.style.js +50 -62
- package/dist/esm/components/Avatar/Avatar.style.js.map +1 -1
- package/dist/esm/components/Avatar/ChainBadgeContent.js +15 -8
- package/dist/esm/components/Avatar/ChainBadgeContent.js.map +1 -1
- package/dist/esm/components/Avatar/SmallAvatar.js +17 -11
- package/dist/esm/components/Avatar/SmallAvatar.js.map +1 -1
- package/dist/esm/components/Avatar/TokenAvatar.js +59 -16
- package/dist/esm/components/Avatar/TokenAvatar.js.map +1 -1
- package/dist/esm/components/Avatar/utils.js +6 -3
- package/dist/esm/components/Avatar/utils.js.map +1 -1
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.js +49 -43
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.js.map +1 -1
- package/dist/esm/components/BottomSheet/BottomSheet.js +45 -32
- package/dist/esm/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/esm/components/ButtonTertiary.js +19 -25
- package/dist/esm/components/ButtonTertiary.js.map +1 -1
- package/dist/esm/components/Card/Card.js +63 -69
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Card/CardButton.js +12 -4
- package/dist/esm/components/Card/CardButton.js.map +1 -1
- package/dist/esm/components/Card/CardButton.style.js +25 -21
- package/dist/esm/components/Card/CardButton.style.js.map +1 -1
- package/dist/esm/components/Card/CardHeader.js +24 -20
- package/dist/esm/components/Card/CardHeader.js.map +1 -1
- package/dist/esm/components/Card/CardIconButton.js +12 -10
- package/dist/esm/components/Card/CardIconButton.js.map +1 -1
- package/dist/esm/components/Card/CardLabel.js +59 -58
- package/dist/esm/components/Card/CardLabel.js.map +1 -1
- package/dist/esm/components/Card/CardTitle.js +20 -24
- package/dist/esm/components/Card/CardTitle.js.map +1 -1
- package/dist/esm/components/Card/InputCard.js +9 -5
- package/dist/esm/components/Card/InputCard.js.map +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.js +121 -59
- package/dist/esm/components/ChainSelect/ChainSelect.js.map +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.style.js +51 -56
- package/dist/esm/components/ChainSelect/ChainSelect.style.js.map +1 -1
- package/dist/esm/components/ChainSelect/useChainSelect.js +57 -73
- package/dist/esm/components/ChainSelect/useChainSelect.js.map +1 -1
- package/dist/esm/components/Chains/AllChainsAvatar.js +102 -99
- package/dist/esm/components/Chains/AllChainsAvatar.js.map +1 -1
- package/dist/esm/components/Chains/ChainList.js +48 -16
- package/dist/esm/components/Chains/ChainList.js.map +1 -1
- package/dist/esm/components/Chains/ChainList.style.js +38 -40
- package/dist/esm/components/Chains/ChainList.style.js.map +1 -1
- package/dist/esm/components/Chains/ChainListItem.js +53 -21
- package/dist/esm/components/Chains/ChainListItem.js.map +1 -1
- package/dist/esm/components/Chains/ChainsExpanded.js +21 -10
- package/dist/esm/components/Chains/ChainsExpanded.js.map +1 -1
- package/dist/esm/components/Chains/ChainsExpanded.style.js +17 -15
- package/dist/esm/components/Chains/ChainsExpanded.style.js.map +1 -1
- package/dist/esm/components/Chains/PinChainButton.js +40 -31
- package/dist/esm/components/Chains/PinChainButton.js.map +1 -1
- package/dist/esm/components/Chains/SelectChainExpansionContent.js +65 -0
- package/dist/esm/components/Chains/SelectChainExpansionContent.js.map +1 -0
- package/dist/esm/components/Chains/SelectChainPageContent.js +60 -0
- package/dist/esm/components/Chains/SelectChainPageContent.js.map +1 -0
- package/dist/esm/components/Chains/VirtualizedChainList.js +141 -118
- package/dist/esm/components/Chains/VirtualizedChainList.js.map +1 -1
- package/dist/esm/components/ContextMenu.js +59 -0
- package/dist/esm/components/ContextMenu.js.map +1 -0
- package/dist/esm/components/ContextMenu.style.js +12 -0
- package/dist/esm/components/ContextMenu.style.js.map +1 -0
- package/dist/esm/components/ContractComponent/ContractComponent.js +12 -7
- package/dist/esm/components/ContractComponent/ContractComponent.js.map +1 -1
- package/dist/esm/components/ContractComponent/ItemPrice.d.ts +11 -6
- package/dist/esm/components/ContractComponent/ItemPrice.d.ts.map +1 -0
- package/dist/esm/components/ContractComponent/ItemPrice.js +27 -22
- package/dist/esm/components/ContractComponent/ItemPrice.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.d.ts +7 -2
- package/dist/esm/components/ContractComponent/NFT/NFT.d.ts.map +1 -0
- package/dist/esm/components/ContractComponent/NFT/NFT.js +31 -22
- package/dist/esm/components/ContractComponent/NFT/NFT.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.style.js +10 -6
- package/dist/esm/components/ContractComponent/NFT/NFT.style.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFTBase.d.ts +7 -2
- package/dist/esm/components/ContractComponent/NFT/NFTBase.d.ts.map +1 -0
- package/dist/esm/components/ContractComponent/NFT/NFTBase.js +74 -23
- package/dist/esm/components/ContractComponent/NFT/NFTBase.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/types.d.ts +18 -13
- package/dist/esm/components/ContractComponent/NFT/types.d.ts.map +1 -0
- package/dist/esm/components/Dialog/Dialog.js +36 -0
- package/dist/esm/components/Dialog/Dialog.js.map +1 -0
- package/dist/esm/components/Dialog/Dialog.style.js +42 -0
- package/dist/esm/components/Dialog/Dialog.style.js.map +1 -0
- package/dist/esm/components/EmptyListIndicator/EmptyListIndicator.js +12 -0
- package/dist/esm/components/EmptyListIndicator/EmptyListIndicator.js.map +1 -0
- package/dist/esm/components/EmptyListIndicator/EmptyListIndicator.style.js +30 -0
- package/dist/esm/components/EmptyListIndicator/EmptyListIndicator.style.js.map +1 -0
- package/dist/esm/components/ExecutionStatusCard/ExecutionChecklist.js +65 -0
- package/dist/esm/components/ExecutionStatusCard/ExecutionChecklist.js.map +1 -0
- package/dist/esm/components/ExecutionStatusCard/ExecutionStatusCard.js +273 -0
- package/dist/esm/components/ExecutionStatusCard/ExecutionStatusCard.js.map +1 -0
- package/dist/esm/components/ExecutionStatusCard/StaggeredRevealTypography.js +47 -0
- package/dist/esm/components/ExecutionStatusCard/StaggeredRevealTypography.js.map +1 -0
- package/dist/esm/components/ExecutionStatusCard/StatusIcon.js +122 -0
- package/dist/esm/components/ExecutionStatusCard/StatusIcon.js.map +1 -0
- package/dist/esm/components/ExecutionStatusCard/StatusIcon.style.js +14 -0
- package/dist/esm/components/ExecutionStatusCard/StatusIcon.style.js.map +1 -0
- package/dist/esm/components/ExecutionStatusCard/iconKey.js +13 -0
- package/dist/esm/components/ExecutionStatusCard/iconKey.js.map +1 -0
- package/dist/esm/components/Expansion/Expansion.js +30 -28
- package/dist/esm/components/Expansion/Expansion.js.map +1 -1
- package/dist/esm/components/Expansion/Expansion.style.js +36 -36
- package/dist/esm/components/Expansion/Expansion.style.js.map +1 -1
- package/dist/esm/components/Expansion/ExpansionTransition.js +30 -14
- package/dist/esm/components/Expansion/ExpansionTransition.js.map +1 -1
- package/dist/esm/components/FeeBreakdownTooltip.js +37 -15
- package/dist/esm/components/FeeBreakdownTooltip.js.map +1 -1
- package/dist/esm/components/Header/ActivitiesButton.js +61 -0
- package/dist/esm/components/Header/ActivitiesButton.js.map +1 -0
- package/dist/esm/components/Header/ActivitiesButton.style.js +39 -0
- package/dist/esm/components/Header/ActivitiesButton.style.js.map +1 -0
- package/dist/esm/components/Header/BackButton.js +22 -20
- package/dist/esm/components/Header/BackButton.js.map +1 -1
- package/dist/esm/components/Header/CloseDrawerButton.js +23 -13
- package/dist/esm/components/Header/CloseDrawerButton.js.map +1 -1
- package/dist/esm/components/Header/DisconnectIconButton.js +18 -10
- package/dist/esm/components/Header/DisconnectIconButton.js.map +1 -1
- package/dist/esm/components/Header/Header.js +37 -35
- package/dist/esm/components/Header/Header.js.map +1 -1
- package/dist/esm/components/Header/Header.style.js +64 -88
- package/dist/esm/components/Header/Header.style.js.map +1 -1
- package/dist/esm/components/Header/HeaderNavigationTabs.js +26 -0
- package/dist/esm/components/Header/HeaderNavigationTabs.js.map +1 -0
- package/dist/esm/components/Header/HeaderTabs.js +33 -0
- package/dist/esm/components/Header/HeaderTabs.js.map +1 -0
- package/dist/esm/components/Header/NavigationHeader.js +62 -41
- package/dist/esm/components/Header/NavigationHeader.js.map +1 -1
- package/dist/esm/components/Header/SettingsButton.js +30 -21
- package/dist/esm/components/Header/SettingsButton.js.map +1 -1
- package/dist/esm/components/Header/SettingsButton.style.js +35 -44
- package/dist/esm/components/Header/SettingsButton.style.js.map +1 -1
- package/dist/esm/components/Header/WalletHeader.js +108 -65
- package/dist/esm/components/Header/WalletHeader.js.map +1 -1
- package/dist/esm/components/Header/WalletMenu.js +98 -47
- package/dist/esm/components/Header/WalletMenu.js.map +1 -1
- package/dist/esm/components/Header/WalletMenu.style.js +24 -24
- package/dist/esm/components/Header/WalletMenu.style.js.map +1 -1
- package/dist/esm/components/IconCircle/IconCircle.js +19 -0
- package/dist/esm/components/IconCircle/IconCircle.js.map +1 -0
- package/dist/esm/components/IconCircle/IconCircle.style.js +57 -0
- package/dist/esm/components/IconCircle/IconCircle.style.js.map +1 -0
- package/dist/esm/components/IconCircle/statusIcons.js +15 -0
- package/dist/esm/components/IconCircle/statusIcons.js.map +1 -0
- package/dist/esm/components/IconTypography.js +9 -7
- package/dist/esm/components/IconTypography.js.map +1 -1
- package/dist/esm/components/Initializer.js +8 -4
- package/dist/esm/components/Initializer.js.map +1 -1
- package/dist/esm/components/Input.js +13 -9
- package/dist/esm/components/Input.js.map +1 -1
- package/dist/esm/components/ListItem/ListItem.js +21 -19
- package/dist/esm/components/ListItem/ListItem.js.map +1 -1
- package/dist/esm/components/ListItem/ListItemButton.js +11 -7
- package/dist/esm/components/ListItem/ListItemButton.js.map +1 -1
- package/dist/esm/components/ListItemButton.js +28 -34
- package/dist/esm/components/ListItemButton.js.map +1 -1
- package/dist/esm/components/ListItemText.js +6 -6
- package/dist/esm/components/ListItemText.js.map +1 -1
- package/dist/esm/components/Menu.js +20 -20
- package/dist/esm/components/Menu.js.map +1 -1
- package/dist/esm/components/Messages/AccountDeployedMessage.js +25 -11
- package/dist/esm/components/Messages/AccountDeployedMessage.js.map +1 -1
- package/dist/esm/components/Messages/AccountNotDeployedMessage.js +22 -8
- package/dist/esm/components/Messages/AccountNotDeployedMessage.js.map +1 -1
- package/dist/esm/components/Messages/AlertMessage.js +15 -3
- package/dist/esm/components/Messages/AlertMessage.js.map +1 -1
- package/dist/esm/components/Messages/AlertMessage.style.js +35 -51
- package/dist/esm/components/Messages/AlertMessage.style.js.map +1 -1
- package/dist/esm/components/Messages/FundsSufficiencyMessage.js +22 -10
- package/dist/esm/components/Messages/FundsSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/Messages/GasRefuelMessage.js +61 -31
- package/dist/esm/components/Messages/GasRefuelMessage.js.map +1 -1
- package/dist/esm/components/Messages/GasRefuelMessage.style.js +16 -20
- package/dist/esm/components/Messages/GasRefuelMessage.style.js.map +1 -1
- package/dist/esm/components/Messages/GasSufficiencyMessage.js +41 -21
- package/dist/esm/components/Messages/GasSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/Messages/MinFromAmountUSDMessage.js +25 -13
- package/dist/esm/components/Messages/MinFromAmountUSDMessage.js.map +1 -1
- package/dist/esm/components/Messages/MissingRouteRequiredAccountMessage.js +29 -18
- package/dist/esm/components/Messages/MissingRouteRequiredAccountMessage.js.map +1 -1
- package/dist/esm/components/Messages/WarningMessages.js +43 -33
- package/dist/esm/components/Messages/WarningMessages.js.map +1 -1
- package/dist/esm/components/Messages/useMessageQueue.js +66 -82
- package/dist/esm/components/Messages/useMessageQueue.js.map +1 -1
- package/dist/esm/components/NotFound.js +42 -24
- package/dist/esm/components/NotFound.js.map +1 -1
- package/dist/esm/components/PageContainer.js +18 -16
- package/dist/esm/components/PageContainer.js.map +1 -1
- package/dist/esm/components/PageEntered.js +15 -11
- package/dist/esm/components/PageEntered.js.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.js +55 -32
- package/dist/esm/components/PoweredBy/PoweredBy.js.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.style.js +10 -8
- package/dist/esm/components/PoweredBy/PoweredBy.style.js.map +1 -1
- package/dist/esm/components/ProgressToNextUpdate.js +64 -47
- package/dist/esm/components/ProgressToNextUpdate.js.map +1 -1
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.js +38 -40
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.js.map +1 -1
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.style.js +29 -25
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.style.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCard.js +84 -67
- package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentials.js +90 -45
- package/dist/esm/components/RouteCard/RouteCardEssentials.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardSkeleton.js +51 -21
- package/dist/esm/components/RouteCard/RouteCardSkeleton.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteDetails.js +100 -0
- package/dist/esm/components/RouteCard/RouteDetails.js.map +1 -0
- package/dist/esm/components/RouteCard/RouteDetails.style.js +35 -0
- package/dist/esm/components/RouteCard/RouteDetails.style.js.map +1 -0
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js +43 -25
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteToken.js +49 -0
- package/dist/esm/components/RouteCard/RouteToken.js.map +1 -0
- package/dist/esm/components/RouteCard/RouteToken.style.js +11 -0
- package/dist/esm/components/RouteCard/RouteToken.style.js.map +1 -0
- package/dist/esm/components/RouteCard/RouteTokens.js +50 -0
- package/dist/esm/components/RouteCard/RouteTokens.js.map +1 -0
- package/dist/esm/components/RouteCard/getMatchingLabels.js +22 -34
- package/dist/esm/components/RouteCard/getMatchingLabels.js.map +1 -1
- package/dist/esm/components/Routes/Routes.js +68 -43
- package/dist/esm/components/Routes/Routes.js.map +1 -1
- package/dist/esm/components/Routes/RoutesContent.js +72 -38
- package/dist/esm/components/Routes/RoutesContent.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.js +67 -51
- package/dist/esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.style.js +31 -34
- package/dist/esm/components/Routes/RoutesExpanded.style.js.map +1 -1
- package/dist/esm/components/Search/SearchInput.js +44 -23
- package/dist/esm/components/Search/SearchInput.js.map +1 -1
- package/dist/esm/components/Search/SearchInput.style.js +25 -61
- package/dist/esm/components/Search/SearchInput.style.js.map +1 -1
- package/dist/esm/components/Search/SearchNotFound.js +8 -4
- package/dist/esm/components/Search/SearchNotFound.js.map +1 -1
- package/dist/esm/components/Search/SearchNotFound.style.js +24 -26
- package/dist/esm/components/Search/SearchNotFound.style.js.map +1 -1
- package/dist/esm/components/SelectChainAndToken.js +34 -28
- package/dist/esm/components/SelectChainAndToken.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.js +68 -55
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js +63 -107
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js +113 -98
- package/dist/esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.style.js +53 -0
- package/dist/esm/components/SendToWallet/SendToWalletButton.style.js.map +1 -0
- package/dist/esm/components/SendToWallet/SendToWalletExpandButton.js +47 -39
- package/dist/esm/components/SendToWallet/SendToWalletExpandButton.js.map +1 -1
- package/dist/esm/components/SettingsListItemButton.js +7 -5
- package/dist/esm/components/SettingsListItemButton.js.map +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.d.ts +10 -2
- package/dist/esm/components/Skeleton/WidgetSkeleton.d.ts.map +1 -0
- package/dist/esm/components/Skeleton/WidgetSkeleton.js +122 -26
- package/dist/esm/components/Skeleton/WidgetSkeleton.js.map +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.js +63 -63
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.js.map +1 -1
- package/dist/esm/components/Step/StepActions.js +198 -0
- package/dist/esm/components/Step/StepActions.js.map +1 -0
- package/dist/esm/components/Step/StepActions.style.js +27 -0
- package/dist/esm/components/Step/StepActions.style.js.map +1 -0
- package/dist/esm/components/StepActions/SentToWalletRow.js +49 -0
- package/dist/esm/components/StepActions/SentToWalletRow.js.map +1 -0
- package/dist/esm/components/StepActions/SentToWalletRow.style.js +26 -0
- package/dist/esm/components/StepActions/SentToWalletRow.style.js.map +1 -0
- package/dist/esm/components/StepActions/StepActionRow.js +27 -0
- package/dist/esm/components/StepActions/StepActionRow.js.map +1 -0
- package/dist/esm/components/StepActions/StepActionRow.style.js +17 -0
- package/dist/esm/components/StepActions/StepActionRow.style.js.map +1 -0
- package/dist/esm/components/StepActions/StepActionsList.js +23 -0
- package/dist/esm/components/StepActions/StepActionsList.js.map +1 -0
- package/dist/esm/components/StepActions/executionRows.js +67 -0
- package/dist/esm/components/StepActions/executionRows.js.map +1 -0
- package/dist/esm/components/Switch.js +45 -49
- package/dist/esm/components/Switch.js.map +1 -1
- package/dist/esm/components/Tabs/NavigationTabs.js +37 -34
- package/dist/esm/components/Tabs/NavigationTabs.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.style.js +28 -34
- package/dist/esm/components/Tabs/Tabs.style.js.map +1 -1
- package/dist/esm/components/TextFitter/TextFitter.js +58 -52
- package/dist/esm/components/TextFitter/TextFitter.js.map +1 -1
- package/dist/esm/components/Timer/ExecutionTimerText.js +10 -0
- package/dist/esm/components/Timer/ExecutionTimerText.js.map +1 -0
- package/dist/esm/components/Timer/StepStatusTimer.js +56 -0
- package/dist/esm/components/Timer/StepStatusTimer.js.map +1 -0
- package/dist/esm/components/Timer/StepStatusTimer.style.js +67 -0
- package/dist/esm/components/Timer/StepStatusTimer.style.js.map +1 -0
- package/dist/esm/components/Token/Token.js +200 -102
- package/dist/esm/components/Token/Token.js.map +1 -1
- package/dist/esm/components/Token/Token.style.js +27 -30
- package/dist/esm/components/Token/Token.style.js.map +1 -1
- package/dist/esm/components/TokenList/PinTokenButton.js +34 -27
- package/dist/esm/components/TokenList/PinTokenButton.js.map +1 -1
- package/dist/esm/components/TokenList/TokenDetailsSheet.js +36 -23
- package/dist/esm/components/TokenList/TokenDetailsSheet.js.map +1 -1
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.js +175 -88
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.js.map +1 -1
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.style.js +27 -23
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.style.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.js +63 -39
- package/dist/esm/components/TokenList/TokenList.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.style.js +26 -26
- package/dist/esm/components/TokenList/TokenList.style.js.map +1 -1
- package/dist/esm/components/TokenList/TokenListItem.js +265 -121
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenList/TokenNotFound.js +10 -6
- package/dist/esm/components/TokenList/TokenNotFound.js.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js +121 -140
- package/dist/esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/dist/esm/components/TokenList/useTokenSelect.js +76 -98
- package/dist/esm/components/TokenList/useTokenSelect.js.map +1 -1
- package/dist/esm/components/TokenRate/TokenRate.js +34 -35
- package/dist/esm/components/TokenRate/TokenRate.js.map +1 -1
- package/dist/esm/components/TokenRate/TokenRate.style.js +17 -15
- package/dist/esm/components/TokenRate/TokenRate.style.js.map +1 -1
- package/dist/esm/components/Tools/ToolItem.js +35 -14
- package/dist/esm/components/Tools/ToolItem.js.map +1 -1
- package/dist/esm/components/Tools/Tools.js +48 -30
- package/dist/esm/components/Tools/Tools.js.map +1 -1
- package/dist/esm/components/TransactionCard/ActiveTransactionCard.js +68 -0
- package/dist/esm/components/TransactionCard/ActiveTransactionCard.js.map +1 -0
- package/dist/esm/components/TransactionCard/ActiveTransactionCard.style.js +21 -0
- package/dist/esm/components/TransactionCard/ActiveTransactionCard.style.js.map +1 -0
- package/dist/esm/components/TransactionCard/TransactionCard.js +32 -0
- package/dist/esm/components/TransactionCard/TransactionCard.js.map +1 -0
- package/dist/esm/components/TransactionCard/TransactionCard.style.js +14 -0
- package/dist/esm/components/TransactionCard/TransactionCard.style.js.map +1 -0
- package/dist/esm/components/TransactionCard/TransactionCardSkeleton.js +63 -0
- package/dist/esm/components/TransactionCard/TransactionCardSkeleton.js.map +1 -0
- package/dist/esm/config/constants.d.ts +5 -2
- package/dist/esm/config/constants.d.ts.map +1 -0
- package/dist/esm/config/constants.js +6 -2
- package/dist/esm/config/constants.js.map +1 -1
- package/dist/esm/config/queryClient.js +17 -20
- package/dist/esm/config/queryClient.js.map +1 -1
- package/dist/esm/config/version.d.ts +6 -2
- package/dist/esm/config/version.d.ts.map +1 -0
- package/dist/esm/config/version.js +6 -2
- package/dist/esm/config/version.js.map +1 -1
- package/dist/esm/hooks/timer/time.js +23 -22
- package/dist/esm/hooks/timer/time.js.map +1 -1
- package/dist/esm/hooks/timer/useExecutionTimer.js +29 -0
- package/dist/esm/hooks/timer/useExecutionTimer.js.map +1 -0
- package/dist/esm/hooks/timer/useInterval.js +17 -16
- package/dist/esm/hooks/timer/useInterval.js.map +1 -1
- package/dist/esm/hooks/timer/useTimer.js +64 -65
- package/dist/esm/hooks/timer/useTimer.js.map +1 -1
- package/dist/esm/hooks/timer/validate.js +12 -12
- package/dist/esm/hooks/timer/validate.js.map +1 -1
- package/dist/esm/hooks/useAccountsBalancesData.js +66 -60
- package/dist/esm/hooks/useAccountsBalancesData.js.map +1 -1
- package/dist/esm/hooks/useActionMessage.js +16 -16
- package/dist/esm/hooks/useActionMessage.js.map +1 -1
- package/dist/esm/hooks/useAddressActivity.js +34 -30
- package/dist/esm/hooks/useAddressActivity.js.map +1 -1
- package/dist/esm/hooks/useAddressValidation.js +48 -57
- package/dist/esm/hooks/useAddressValidation.js.map +1 -1
- package/dist/esm/hooks/useAvailableChains.js +65 -73
- package/dist/esm/hooks/useAvailableChains.js.map +1 -1
- package/dist/esm/hooks/useChain.js +13 -10
- package/dist/esm/hooks/useChain.js.map +1 -1
- package/dist/esm/hooks/useChainSearch.js +39 -0
- package/dist/esm/hooks/useChainSearch.js.map +1 -0
- package/dist/esm/hooks/useChains.js +24 -21
- package/dist/esm/hooks/useChains.js.map +1 -1
- package/dist/esm/hooks/useContactSupport.js +15 -0
- package/dist/esm/hooks/useContactSupport.js.map +1 -0
- package/dist/esm/hooks/useDebouncedWatch.js +26 -24
- package/dist/esm/hooks/useDebouncedWatch.js.map +1 -1
- package/dist/esm/hooks/useDefaultElementId.js +8 -4
- package/dist/esm/hooks/useDefaultElementId.js.map +1 -1
- package/dist/esm/hooks/useExplorer.js +57 -53
- package/dist/esm/hooks/useExplorer.js.map +1 -1
- package/dist/esm/hooks/useFilteredByTokenBalances.js +69 -85
- package/dist/esm/hooks/useFilteredByTokenBalances.js.map +1 -1
- package/dist/esm/hooks/useFromAmountThreshold.js +27 -21
- package/dist/esm/hooks/useFromAmountThreshold.js.map +1 -1
- package/dist/esm/hooks/useFromTokenSufficiency.js +54 -62
- package/dist/esm/hooks/useFromTokenSufficiency.js.map +1 -1
- package/dist/esm/hooks/useGasRecommendation.js +36 -40
- package/dist/esm/hooks/useGasRecommendation.js.map +1 -1
- package/dist/esm/hooks/useGasRefuel.js +43 -60
- package/dist/esm/hooks/useGasRefuel.js.map +1 -1
- package/dist/esm/hooks/useGasSufficiency.js +102 -148
- package/dist/esm/hooks/useGasSufficiency.js.map +1 -1
- package/dist/esm/hooks/useHasChainExpansion.js +15 -22
- package/dist/esm/hooks/useHasChainExpansion.js.map +1 -1
- package/dist/esm/hooks/useHeader.js +21 -17
- package/dist/esm/hooks/useHeader.js.map +1 -1
- package/dist/esm/hooks/useInitializeSDKProviders.js +13 -9
- package/dist/esm/hooks/useInitializeSDKProviders.js.map +1 -1
- package/dist/esm/hooks/useInitializer.js +16 -12
- package/dist/esm/hooks/useInitializer.js.map +1 -1
- package/dist/esm/hooks/useIsBatchingSupported.js +35 -31
- package/dist/esm/hooks/useIsBatchingSupported.js.map +1 -1
- package/dist/esm/hooks/useIsContractAddress.js +28 -21
- package/dist/esm/hooks/useIsContractAddress.js.map +1 -1
- package/dist/esm/hooks/useLanguages.js +51 -60
- package/dist/esm/hooks/useLanguages.js.map +1 -1
- package/dist/esm/hooks/useListHeight.js +46 -59
- package/dist/esm/hooks/useListHeight.js.map +1 -1
- package/dist/esm/hooks/useLongPress.js +38 -39
- package/dist/esm/hooks/useLongPress.js.map +1 -1
- package/dist/esm/hooks/useNavigateBack.js +16 -14
- package/dist/esm/hooks/useNavigateBack.js.map +1 -1
- package/dist/esm/hooks/usePacedRouteExecution.js +30 -0
- package/dist/esm/hooks/usePacedRouteExecution.js.map +1 -0
- package/dist/esm/hooks/usePacedValue.js +42 -0
- package/dist/esm/hooks/usePacedValue.js.map +1 -0
- package/dist/esm/hooks/useRouteExecution.js +154 -189
- package/dist/esm/hooks/useRouteExecution.js.map +1 -1
- package/dist/esm/hooks/useRouteExecutionMessage.js +61 -0
- package/dist/esm/hooks/useRouteExecutionMessage.js.map +1 -0
- package/dist/esm/hooks/useRouteRequiredAccountConnection.js +35 -43
- package/dist/esm/hooks/useRouteRequiredAccountConnection.js.map +1 -1
- package/dist/esm/hooks/useRoutes.js +301 -393
- package/dist/esm/hooks/useRoutes.js.map +1 -1
- package/dist/esm/hooks/useScrollableContainer.js +10 -30
- package/dist/esm/hooks/useScrollableContainer.js.map +1 -1
- package/dist/esm/hooks/useSetContentHeight.js +21 -21
- package/dist/esm/hooks/useSetContentHeight.js.map +1 -1
- package/dist/esm/hooks/useSettingMonitor.js +49 -53
- package/dist/esm/hooks/useSettingMonitor.js.map +1 -1
- package/dist/esm/hooks/useSwapOnly.js +6 -5
- package/dist/esm/hooks/useSwapOnly.js.map +1 -1
- package/dist/esm/hooks/useToAddressAutoPopulate.js +48 -67
- package/dist/esm/hooks/useToAddressAutoPopulate.js.map +1 -1
- package/dist/esm/hooks/useToAddressRequirements.js +39 -56
- package/dist/esm/hooks/useToAddressRequirements.js.map +1 -1
- package/dist/esm/hooks/useToAddressReset.js +27 -43
- package/dist/esm/hooks/useToAddressReset.js.map +1 -1
- package/dist/esm/hooks/useToken.js +21 -18
- package/dist/esm/hooks/useToken.js.map +1 -1
- package/dist/esm/hooks/useTokenAddressBalance.js +19 -15
- package/dist/esm/hooks/useTokenAddressBalance.js.map +1 -1
- package/dist/esm/hooks/useTokenBalance.js +90 -89
- package/dist/esm/hooks/useTokenBalance.js.map +1 -1
- package/dist/esm/hooks/useTokenBalances.js +109 -127
- package/dist/esm/hooks/useTokenBalances.js.map +1 -1
- package/dist/esm/hooks/useTokenBalancesQueries.js +61 -74
- package/dist/esm/hooks/useTokenBalancesQueries.js.map +1 -1
- package/dist/esm/hooks/useTokenRateText.js +36 -0
- package/dist/esm/hooks/useTokenRateText.js.map +1 -0
- package/dist/esm/hooks/useTokenSearch.js +46 -53
- package/dist/esm/hooks/useTokenSearch.js.map +1 -1
- package/dist/esm/hooks/useTokens.js +98 -103
- package/dist/esm/hooks/useTokens.js.map +1 -1
- package/dist/esm/hooks/useTools.js +40 -36
- package/dist/esm/hooks/useTools.js.map +1 -1
- package/dist/esm/hooks/useTransactionDetails.js +47 -60
- package/dist/esm/hooks/useTransactionDetails.js.map +1 -1
- package/dist/esm/hooks/useTransactionHistory.js +66 -59
- package/dist/esm/hooks/useTransactionHistory.js.map +1 -1
- package/dist/esm/hooks/useTransactionList.js +57 -0
- package/dist/esm/hooks/useTransactionList.js.map +1 -0
- package/dist/esm/hooks/useWideVariant.js +10 -6
- package/dist/esm/hooks/useWideVariant.js.map +1 -1
- package/dist/esm/hooks/useWidgetChains.d.ts +11 -5
- package/dist/esm/hooks/useWidgetChains.d.ts.map +1 -0
- package/dist/esm/hooks/useWidgetChains.js +7 -3
- package/dist/esm/hooks/useWidgetChains.js.map +1 -1
- package/dist/esm/hooks/useWidgetEvents.d.ts +10 -4
- package/dist/esm/hooks/useWidgetEvents.d.ts.map +1 -0
- package/dist/esm/hooks/useWidgetEvents.js +7 -7
- package/dist/esm/hooks/useWidgetEvents.js.map +1 -1
- package/dist/esm/i18n/bn.json +350 -345
- package/dist/esm/i18n/de.json +350 -345
- package/dist/esm/i18n/en.json +351 -345
- package/dist/esm/i18n/es.json +350 -345
- package/dist/esm/i18n/fr.json +350 -345
- package/dist/esm/i18n/hi.json +350 -345
- package/dist/esm/i18n/id.json +350 -345
- package/dist/esm/i18n/it.json +350 -345
- package/dist/esm/i18n/ja.json +350 -345
- package/dist/esm/i18n/ko.json +350 -345
- package/dist/esm/i18n/pl.json +350 -345
- package/dist/esm/i18n/pt.json +350 -345
- package/dist/esm/i18n/th.json +350 -345
- package/dist/esm/i18n/tr.json +350 -345
- package/dist/esm/i18n/uk.json +350 -345
- package/dist/esm/i18n/vi.json +350 -345
- package/dist/esm/i18n/zh.json +350 -345
- package/dist/esm/index.d.ts +33 -33
- package/dist/esm/index.js +28 -31
- package/dist/esm/pages/ActivitiesPage/ActiveTransactionItem.js +36 -0
- package/dist/esm/pages/ActivitiesPage/ActiveTransactionItem.js.map +1 -0
- package/dist/esm/pages/ActivitiesPage/ActivitiesPage.js +101 -0
- package/dist/esm/pages/ActivitiesPage/ActivitiesPage.js.map +1 -0
- package/dist/esm/pages/ActivitiesPage/ActivitiesPageMenuButton.js +55 -0
- package/dist/esm/pages/ActivitiesPage/ActivitiesPageMenuButton.js.map +1 -0
- package/dist/esm/pages/ActivitiesPage/TransactionHistoryEmpty.js +17 -0
- package/dist/esm/pages/ActivitiesPage/TransactionHistoryEmpty.js.map +1 -0
- package/dist/esm/pages/ActivitiesPage/TransactionHistoryItem.js +24 -0
- package/dist/esm/pages/ActivitiesPage/TransactionHistoryItem.js.map +1 -0
- package/dist/esm/pages/LanguagesPage.js +29 -27
- package/dist/esm/pages/LanguagesPage.js.map +1 -1
- package/dist/esm/pages/MainPage/MainPage.js +57 -45
- package/dist/esm/pages/MainPage/MainPage.js.map +1 -1
- package/dist/esm/pages/MainPage/MainWarningMessages.js +14 -7
- package/dist/esm/pages/MainPage/MainWarningMessages.js.map +1 -1
- package/dist/esm/pages/MainPage/ReviewButton.js +58 -66
- package/dist/esm/pages/MainPage/ReviewButton.js.map +1 -1
- package/dist/esm/pages/RoutesPage/RoutesPage.js +72 -42
- package/dist/esm/pages/RoutesPage/RoutesPage.js.map +1 -1
- package/dist/esm/pages/RoutesPage/RoutesPage.style.js +8 -4
- package/dist/esm/pages/RoutesPage/RoutesPage.style.js.map +1 -1
- package/dist/esm/pages/SelectChainPage/SelectChainPage.js +33 -24
- package/dist/esm/pages/SelectChainPage/SelectChainPage.js.map +1 -1
- package/dist/esm/pages/SelectEnabledToolsPage.js +102 -54
- package/dist/esm/pages/SelectEnabledToolsPage.js.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SearchTokenInput.js +38 -28
- package/dist/esm/pages/SelectTokenPage/SearchTokenInput.js.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js +44 -45
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js +175 -116
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarksPage.js +122 -96
- package/dist/esm/pages/SendToWallet/BookmarksPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js +80 -43
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js +104 -94
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js +122 -109
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js +82 -76
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js +235 -159
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js +88 -122
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/BridgeAndExchangeSettings.js +45 -37
- package/dist/esm/pages/SettingsPage/BridgeAndExchangeSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/GasPriceSettings.js +54 -18
- package/dist/esm/pages/SettingsPage/GasPriceSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/LanguageSetting.js +29 -27
- package/dist/esm/pages/SettingsPage/LanguageSetting.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.js +62 -32
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.js +10 -8
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/RoutePrioritySettings.js +46 -22
- package/dist/esm/pages/SettingsPage/RoutePrioritySettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/BadgedValue.js +12 -4
- package/dist/esm/pages/SettingsPage/SettingsCard/BadgedValue.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCard.style.js +20 -17
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCard.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +46 -18
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingsAccordian.js +33 -27
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingsAccordian.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsPage.js +37 -21
- package/dist/esm/pages/SettingsPage/SettingsPage.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js +89 -74
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +55 -69
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SmallBalanceFilterSettings.js +73 -56
- package/dist/esm/pages/SettingsPage/SmallBalanceFilterSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ThemeSettings.js +56 -33
- package/dist/esm/pages/SettingsPage/ThemeSettings.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.js +14 -20
- package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.style.js +14 -0
- package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.style.js.map +1 -0
- package/dist/esm/pages/TransactionDetailsPage/ReceiptsCard.js +28 -0
- package/dist/esm/pages/TransactionDetailsPage/ReceiptsCard.js.map +1 -0
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +82 -85
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +78 -31
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js +63 -30
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js.map +1 -1
- package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.js +78 -36
- package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js +144 -92
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.style.js +11 -0
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.style.js.map +1 -0
- package/dist/esm/pages/TransactionPage/ExecutionDoneCard.js +38 -0
- package/dist/esm/pages/TransactionPage/ExecutionDoneCard.js.map +1 -0
- package/dist/esm/pages/TransactionPage/RouteTracker.js +45 -37
- package/dist/esm/pages/TransactionPage/RouteTracker.js.map +1 -1
- package/dist/esm/pages/TransactionPage/StartTransactionButton.js +19 -10
- package/dist/esm/pages/TransactionPage/StartTransactionButton.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js +80 -73
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.style.js +44 -0
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.style.js.map +1 -0
- package/dist/esm/pages/TransactionPage/TransactionContent.js +21 -0
- package/dist/esm/pages/TransactionPage/TransactionContent.js.map +1 -0
- package/dist/esm/pages/TransactionPage/TransactionDoneButtons.js +46 -0
- package/dist/esm/pages/TransactionPage/TransactionDoneButtons.js.map +1 -0
- package/dist/esm/pages/TransactionPage/TransactionExecutionContent.js +74 -0
- package/dist/esm/pages/TransactionPage/TransactionExecutionContent.js.map +1 -0
- package/dist/esm/pages/TransactionPage/TransactionFailedButtons.js +80 -0
- package/dist/esm/pages/TransactionPage/TransactionFailedButtons.js.map +1 -0
- package/dist/esm/pages/TransactionPage/TransactionPage.js +77 -160
- package/dist/esm/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionReview.js +115 -0
- package/dist/esm/pages/TransactionPage/TransactionReview.js.map +1 -0
- package/dist/esm/pages/TransactionPage/utils.js +9 -8
- package/dist/esm/pages/TransactionPage/utils.js.map +1 -1
- package/dist/esm/providers/I18nProvider/I18nProvider.js +79 -93
- package/dist/esm/providers/I18nProvider/I18nProvider.js.map +1 -1
- package/dist/esm/providers/I18nProvider/constants.js +40 -36
- package/dist/esm/providers/I18nProvider/constants.js.map +1 -1
- package/dist/esm/providers/I18nProvider/enResource.d.ts +2 -2
- package/dist/esm/providers/I18nProvider/enResource.js +2 -4
- package/dist/esm/providers/I18nProvider/i18n.js +15 -24
- package/dist/esm/providers/I18nProvider/i18n.js.map +1 -1
- package/dist/esm/providers/I18nProvider/types.d.ts +11 -10
- package/dist/esm/providers/I18nProvider/types.d.ts.map +1 -0
- package/dist/esm/providers/QueryClientProvider.js +13 -7
- package/dist/esm/providers/QueryClientProvider.js.map +1 -1
- package/dist/esm/providers/SDKClientProvider.js +39 -34
- package/dist/esm/providers/SDKClientProvider.js.map +1 -1
- package/dist/esm/providers/ThemeProvider/ThemeProvider.js +23 -16
- package/dist/esm/providers/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/esm/providers/WalletProvider/WalletProvider.js +36 -31
- package/dist/esm/providers/WalletProvider/WalletProvider.js.map +1 -1
- package/dist/esm/providers/WalletProvider/useExternalWalletProvider.js +41 -49
- package/dist/esm/providers/WalletProvider/useExternalWalletProvider.js.map +1 -1
- package/dist/esm/providers/WidgetProvider/WidgetProvider.js +39 -36
- package/dist/esm/providers/WidgetProvider/WidgetProvider.js.map +1 -1
- package/dist/esm/stores/StoreProvider.js +35 -13
- package/dist/esm/stores/StoreProvider.js.map +1 -1
- package/dist/esm/stores/bookmarks/BookmarkStore.js +24 -18
- package/dist/esm/stores/bookmarks/BookmarkStore.js.map +1 -1
- package/dist/esm/stores/bookmarks/createBookmarkStore.js +41 -52
- package/dist/esm/stores/bookmarks/createBookmarkStore.js.map +1 -1
- package/dist/esm/stores/bookmarks/types.d.ts +23 -18
- package/dist/esm/stores/bookmarks/types.d.ts.map +1 -0
- package/dist/esm/stores/bookmarks/useBookmarkActions.js +15 -12
- package/dist/esm/stores/bookmarks/useBookmarkActions.js.map +1 -1
- package/dist/esm/stores/bookmarks/useBookmarks.js +16 -8
- package/dist/esm/stores/bookmarks/useBookmarks.js.map +1 -1
- package/dist/esm/stores/chains/ChainOrderStore.js +76 -113
- package/dist/esm/stores/chains/ChainOrderStore.js.map +1 -1
- package/dist/esm/stores/chains/createChainOrderStore.js +82 -101
- package/dist/esm/stores/chains/createChainOrderStore.js.map +1 -1
- package/dist/esm/stores/chains/useChainOrder.js +9 -10
- package/dist/esm/stores/chains/useChainOrder.js.map +1 -1
- package/dist/esm/stores/form/FormStore.js +68 -88
- package/dist/esm/stores/form/FormStore.js.map +1 -1
- package/dist/esm/stores/form/FormStoreContext.js +6 -2
- package/dist/esm/stores/form/FormStoreContext.js.map +1 -1
- package/dist/esm/stores/form/FormUpdater.js +33 -42
- package/dist/esm/stores/form/FormUpdater.js.map +1 -1
- package/dist/esm/stores/form/URLSearchParamsBuilder.js +75 -87
- package/dist/esm/stores/form/URLSearchParamsBuilder.js.map +1 -1
- package/dist/esm/stores/form/createFormStore.js +165 -175
- package/dist/esm/stores/form/createFormStore.js.map +1 -1
- package/dist/esm/stores/form/getDefaultValuesFromQueryString.js +20 -30
- package/dist/esm/stores/form/getDefaultValuesFromQueryString.js.map +1 -1
- package/dist/esm/stores/form/types.d.ts +64 -72
- package/dist/esm/stores/form/types.d.ts.map +1 -0
- package/dist/esm/stores/form/types.js +8 -4
- package/dist/esm/stores/form/types.js.map +1 -1
- package/dist/esm/stores/form/useClearAmountFields.js +14 -0
- package/dist/esm/stores/form/useClearAmountFields.js.map +1 -0
- package/dist/esm/stores/form/useFieldActions.d.ts +7 -11
- package/dist/esm/stores/form/useFieldActions.d.ts.map +1 -0
- package/dist/esm/stores/form/useFieldActions.js +59 -51
- package/dist/esm/stores/form/useFieldActions.js.map +1 -1
- package/dist/esm/stores/form/useFieldValues.d.ts +7 -2
- package/dist/esm/stores/form/useFieldValues.d.ts.map +1 -0
- package/dist/esm/stores/form/useFieldValues.js +7 -5
- package/dist/esm/stores/form/useFieldValues.js.map +1 -1
- package/dist/esm/stores/form/useFormRef.js +34 -43
- package/dist/esm/stores/form/useFormRef.js.map +1 -1
- package/dist/esm/stores/form/useFormStore.js +11 -9
- package/dist/esm/stores/form/useFormStore.js.map +1 -1
- package/dist/esm/stores/form/useTouchedFields.js +7 -4
- package/dist/esm/stores/form/useTouchedFields.js.map +1 -1
- package/dist/esm/stores/header/useHeaderStore.js +52 -75
- package/dist/esm/stores/header/useHeaderStore.js.map +1 -1
- package/dist/esm/stores/inputMode/useInputModeStore.js +18 -17
- package/dist/esm/stores/inputMode/useInputModeStore.js.map +1 -1
- package/dist/esm/stores/navigationTabs/useNavigationTabLabel.js +22 -0
- package/dist/esm/stores/navigationTabs/useNavigationTabLabel.js.map +1 -0
- package/dist/esm/stores/navigationTabs/useNavigationTabsStore.js +62 -0
- package/dist/esm/stores/navigationTabs/useNavigationTabsStore.js.map +1 -0
- package/dist/esm/stores/navigationTabs/utils.js +92 -0
- package/dist/esm/stores/navigationTabs/utils.js.map +1 -0
- package/dist/esm/stores/pinnedTokens/PinnedTokensStore.js +19 -16
- package/dist/esm/stores/pinnedTokens/PinnedTokensStore.js.map +1 -1
- package/dist/esm/stores/pinnedTokens/createPinnedTokensStore.js +54 -58
- package/dist/esm/stores/pinnedTokens/createPinnedTokensStore.js.map +1 -1
- package/dist/esm/stores/routes/RouteExecutionStore.js +21 -19
- package/dist/esm/stores/routes/RouteExecutionStore.js.map +1 -1
- package/dist/esm/stores/routes/createRouteExecutionStore.js +82 -116
- package/dist/esm/stores/routes/createRouteExecutionStore.js.map +1 -1
- package/dist/esm/stores/routes/useIntermediateRoutesStore.js +17 -14
- package/dist/esm/stores/routes/useIntermediateRoutesStore.js.map +1 -1
- package/dist/esm/stores/routes/useRouteExecutionIndicator.js +23 -0
- package/dist/esm/stores/routes/useRouteExecutionIndicator.js.map +1 -0
- package/dist/esm/stores/routes/useSetExecutableRoute.js +7 -3
- package/dist/esm/stores/routes/useSetExecutableRoute.js.map +1 -1
- package/dist/esm/stores/routes/utils.js +27 -34
- package/dist/esm/stores/routes/utils.js.map +1 -1
- package/dist/esm/stores/settings/SettingsStore.js +21 -19
- package/dist/esm/stores/settings/SettingsStore.js.map +1 -1
- package/dist/esm/stores/settings/createSettingsStore.js +148 -155
- package/dist/esm/stores/settings/createSettingsStore.js.map +1 -1
- package/dist/esm/stores/settings/types.d.ts +22 -54
- package/dist/esm/stores/settings/types.d.ts.map +1 -0
- package/dist/esm/stores/settings/types.js +5 -1
- package/dist/esm/stores/settings/types.js.map +1 -1
- package/dist/esm/stores/settings/useSettings.js +10 -6
- package/dist/esm/stores/settings/useSettings.js.map +1 -1
- package/dist/esm/stores/settings/useSettingsActions.js +66 -80
- package/dist/esm/stores/settings/useSettingsActions.js.map +1 -1
- package/dist/esm/stores/settings/utils/getStateValues.js +18 -14
- package/dist/esm/stores/settings/utils/getStateValues.js.map +1 -1
- package/dist/esm/themes/azureLight.d.ts +7 -2
- package/dist/esm/themes/azureLight.d.ts.map +1 -0
- package/dist/esm/themes/azureLight.js +39 -58
- package/dist/esm/themes/azureLight.js.map +1 -1
- package/dist/esm/themes/createTheme.d.ts +8 -2
- package/dist/esm/themes/createTheme.d.ts.map +1 -0
- package/dist/esm/themes/createTheme.js +304 -420
- package/dist/esm/themes/createTheme.js.map +1 -1
- package/dist/esm/themes/jumper.d.ts +7 -2
- package/dist/esm/themes/jumper.d.ts.map +1 -0
- package/dist/esm/themes/jumper.js +56 -74
- package/dist/esm/themes/jumper.js.map +1 -1
- package/dist/esm/themes/palettes.d.ts +51 -47
- package/dist/esm/themes/palettes.d.ts.map +1 -0
- package/dist/esm/themes/palettes.js +39 -47
- package/dist/esm/themes/palettes.js.map +1 -1
- package/dist/esm/themes/types.d.ts +65 -73
- package/dist/esm/themes/types.d.ts.map +1 -0
- package/dist/esm/themes/utils.js +11 -7
- package/dist/esm/themes/utils.js.map +1 -1
- package/dist/esm/themes/watermelonLight.d.ts +7 -2
- package/dist/esm/themes/watermelonLight.d.ts.map +1 -0
- package/dist/esm/themes/watermelonLight.js +43 -77
- package/dist/esm/themes/watermelonLight.js.map +1 -1
- package/dist/esm/themes/windows95.d.ts +7 -2
- package/dist/esm/themes/windows95.d.ts.map +1 -0
- package/dist/esm/themes/windows95.js +74 -124
- package/dist/esm/themes/windows95.js.map +1 -1
- package/dist/esm/types/events.d.ts +85 -93
- package/dist/esm/types/events.d.ts.map +1 -0
- package/dist/esm/types/events.js +25 -25
- package/dist/esm/types/events.js.map +1 -1
- package/dist/esm/types/token.d.ts +11 -14
- package/dist/esm/types/token.d.ts.map +1 -0
- package/dist/esm/types/widget.d.ts +315 -281
- package/dist/esm/types/widget.d.ts.map +1 -0
- package/dist/esm/types/widget.js +10 -44
- package/dist/esm/types/widget.js.map +1 -1
- package/dist/esm/utils/chainType.js +12 -8
- package/dist/esm/utils/chainType.js.map +1 -1
- package/dist/esm/utils/compactNumberFormatter.d.ts +13 -9
- package/dist/esm/utils/compactNumberFormatter.d.ts.map +1 -0
- package/dist/esm/utils/compactNumberFormatter.js +61 -75
- package/dist/esm/utils/compactNumberFormatter.js.map +1 -1
- package/dist/esm/utils/converters.js +164 -188
- package/dist/esm/utils/converters.js.map +1 -1
- package/dist/esm/utils/currencyExtendedFormatter.d.ts +5 -1
- package/dist/esm/utils/currencyExtendedFormatter.d.ts.map +1 -0
- package/dist/esm/utils/currencyExtendedFormatter.js +13 -11
- package/dist/esm/utils/currencyExtendedFormatter.js.map +1 -1
- package/dist/esm/utils/deepEqual.js +29 -49
- package/dist/esm/utils/deepEqual.js.map +1 -1
- package/dist/esm/utils/deepMerge.js +11 -13
- package/dist/esm/utils/deepMerge.js.map +1 -1
- package/dist/esm/utils/elements.js +9 -14
- package/dist/esm/utils/elements.js.map +1 -1
- package/dist/esm/utils/enum.js +5 -1
- package/dist/esm/utils/enum.js.map +1 -1
- package/dist/esm/utils/fees.js +66 -74
- package/dist/esm/utils/fees.js.map +1 -1
- package/dist/esm/utils/format.d.ts +26 -22
- package/dist/esm/utils/format.d.ts.map +1 -0
- package/dist/esm/utils/format.js +85 -130
- package/dist/esm/utils/format.js.map +1 -1
- package/dist/esm/utils/getActionMessage.js +62 -105
- package/dist/esm/utils/getActionMessage.js.map +1 -1
- package/dist/esm/utils/getErrorMessage.js +115 -116
- package/dist/esm/utils/getErrorMessage.js.map +1 -1
- package/dist/esm/utils/getPriceImpact.d.ts +16 -7
- package/dist/esm/utils/getPriceImpact.d.ts.map +1 -0
- package/dist/esm/utils/getPriceImpact.js +10 -9
- package/dist/esm/utils/getPriceImpact.js.map +1 -1
- package/dist/esm/utils/input.js +21 -25
- package/dist/esm/utils/input.js.map +1 -1
- package/dist/esm/utils/item.js +22 -31
- package/dist/esm/utils/item.js.map +1 -1
- package/dist/esm/utils/mode.js +10 -0
- package/dist/esm/utils/mode.js.map +1 -0
- package/dist/esm/utils/navigationRoutes.d.ts +25 -26
- package/dist/esm/utils/navigationRoutes.d.ts.map +1 -0
- package/dist/esm/utils/navigationRoutes.js +61 -60
- package/dist/esm/utils/navigationRoutes.js.map +1 -1
- package/dist/esm/utils/percentFormatter.d.ts +10 -6
- package/dist/esm/utils/percentFormatter.d.ts.map +1 -0
- package/dist/esm/utils/percentFormatter.js +20 -20
- package/dist/esm/utils/percentFormatter.js.map +1 -1
- package/dist/esm/utils/prepareActions.js +18 -21
- package/dist/esm/utils/prepareActions.js.map +1 -1
- package/dist/esm/utils/queries.js +5 -1
- package/dist/esm/utils/queries.js.map +1 -1
- package/dist/esm/utils/timer.js +21 -21
- package/dist/esm/utils/timer.js.map +1 -1
- package/dist/esm/utils/token.js +53 -67
- package/dist/esm/utils/token.js.map +1 -1
- package/dist/esm/utils/tokenList.js +140 -197
- package/dist/esm/utils/tokenList.js.map +1 -1
- package/dist/esm/utils/wallet.js +5 -3
- package/dist/esm/utils/wallet.js.map +1 -1
- package/dist/esm/utils/widgetSize.js +9 -9
- package/dist/esm/utils/widgetSize.js.map +1 -1
- package/package.json +17 -16
- package/src/App.tsx +7 -4
- package/src/AppDefault.tsx +29 -46
- package/src/AppDrawer.tsx +13 -9
- package/src/AppDrawerContext.ts +4 -3
- package/src/components/ActionRow/ActionRow.style.tsx +21 -0
- package/src/components/ActionRow/ActionRow.tsx +25 -0
- package/src/components/AmountInput/AmountInput.style.tsx +22 -12
- package/src/components/AmountInput/AmountInput.tsx +5 -11
- package/src/components/AmountInput/AmountInputEndAdornment.style.ts +22 -0
- package/src/components/AmountInput/AmountInputEndAdornment.tsx +74 -70
- package/src/components/AmountInput/PriceFormHelperText.style.tsx +29 -27
- package/src/components/AmountInput/PriceFormHelperText.tsx +17 -15
- package/src/components/AppContainer.tsx +26 -36
- package/src/components/Avatar/AccountAvatar.tsx +2 -1
- package/src/components/Avatar/Avatar.style.tsx +22 -6
- package/src/components/Avatar/SmallAvatar.tsx +4 -1
- package/src/components/BaseTransactionButton/BaseTransactionButton.tsx +3 -0
- package/src/components/BaseTransactionButton/types.ts +2 -0
- package/src/components/BottomSheet/BottomSheet.tsx +57 -50
- package/src/components/ButtonTertiary.tsx +22 -20
- package/src/components/Card/Card.tsx +62 -60
- package/src/components/Card/CardButton.style.tsx +27 -23
- package/src/components/Card/CardHeader.tsx +22 -20
- package/src/components/Card/CardIconButton.tsx +8 -3
- package/src/components/Card/CardLabel.tsx +21 -3
- package/src/components/Card/CardTitle.tsx +4 -1
- package/src/components/Card/InputCard.tsx +8 -4
- package/src/components/ChainSelect/ChainSelect.style.tsx +17 -6
- package/src/components/ChainSelect/ChainSelect.tsx +111 -103
- package/src/components/ChainSelect/useChainSelect.ts +22 -13
- package/src/components/Chains/AllChainsAvatar.tsx +12 -6
- package/src/components/Chains/ChainList.style.tsx +37 -13
- package/src/components/Chains/ChainList.tsx +3 -8
- package/src/components/Chains/ChainListItem.tsx +59 -57
- package/src/components/Chains/ChainsExpanded.style.tsx +4 -1
- package/src/components/Chains/ChainsExpanded.tsx +15 -16
- package/src/components/Chains/PinChainButton.tsx +5 -1
- package/src/components/Chains/SelectChainExpansionContent.tsx +84 -0
- package/src/components/Chains/SelectChainPageContent.tsx +66 -0
- package/src/components/Chains/VirtualizedChainList.tsx +2 -2
- package/src/components/ContextMenu.style.tsx +13 -0
- package/src/components/ContextMenu.tsx +75 -0
- package/src/components/ContractComponent/ItemPrice.tsx +1 -1
- package/src/components/ContractComponent/NFT/NFT.style.ts +8 -6
- package/src/components/ContractComponent/NFT/NFTBase.tsx +1 -1
- package/src/components/Dialog/Dialog.style.tsx +59 -0
- package/src/components/{Dialog.tsx → Dialog/Dialog.tsx} +3 -3
- package/src/components/EmptyListIndicator/EmptyListIndicator.style.tsx +38 -0
- package/src/components/EmptyListIndicator/EmptyListIndicator.tsx +25 -0
- package/src/components/ExecutionStatusCard/ExecutionChecklist.tsx +61 -0
- package/src/components/ExecutionStatusCard/ExecutionStatusCard.tsx +242 -0
- package/src/components/ExecutionStatusCard/StaggeredRevealTypography.tsx +59 -0
- package/src/components/ExecutionStatusCard/StatusIcon.style.tsx +13 -0
- package/src/components/ExecutionStatusCard/StatusIcon.tsx +99 -0
- package/src/components/ExecutionStatusCard/iconKey.ts +37 -0
- package/src/components/Expansion/Expansion.style.tsx +4 -1
- package/src/components/Expansion/Expansion.tsx +2 -2
- package/src/components/Expansion/ExpansionTransition.tsx +2 -2
- package/src/components/Header/ActivitiesButton.style.tsx +67 -0
- package/src/components/Header/ActivitiesButton.tsx +59 -0
- package/src/components/Header/CloseDrawerButton.tsx +9 -2
- package/src/components/Header/DisconnectIconButton.tsx +6 -1
- package/src/components/Header/Header.style.ts +25 -9
- package/src/components/Header/Header.tsx +21 -19
- package/src/components/Header/HeaderNavigationTabs.tsx +25 -0
- package/src/components/Header/HeaderTabs.tsx +48 -0
- package/src/components/Header/NavigationHeader.tsx +14 -18
- package/src/components/Header/SettingsButton.style.tsx +15 -10
- package/src/components/Header/SettingsButton.tsx +2 -1
- package/src/components/Header/WalletHeader.tsx +2 -3
- package/src/components/Header/WalletMenu.style.tsx +4 -1
- package/src/components/Header/WalletMenu.tsx +6 -1
- package/src/components/IconCircle/IconCircle.style.tsx +85 -0
- package/src/components/IconCircle/IconCircle.tsx +29 -0
- package/src/components/IconCircle/statusIcons.ts +14 -0
- package/src/components/IconTypography.ts +5 -3
- package/src/components/Input.tsx +4 -1
- package/src/components/ListItem/ListItem.tsx +22 -19
- package/src/components/ListItem/ListItemButton.tsx +4 -1
- package/src/components/ListItemButton.tsx +5 -2
- package/src/components/ListItemText.tsx +4 -1
- package/src/components/Menu.tsx +4 -1
- package/src/components/Messages/AlertMessage.style.tsx +11 -6
- package/src/components/Messages/AlertMessage.tsx +3 -3
- package/src/components/Messages/GasRefuelMessage.style.ts +16 -14
- package/src/components/Messages/WarningMessages.tsx +0 -3
- package/src/components/Messages/useMessageQueue.ts +10 -12
- package/src/components/PageContainer.ts +5 -2
- package/src/components/PoweredBy/PoweredBy.style.ts +4 -1
- package/src/components/ReverseTokensButton/ReverseTokensButton.style.tsx +16 -10
- package/src/components/ReverseTokensButton/ReverseTokensButton.tsx +7 -10
- package/src/components/RouteCard/RouteCard.tsx +16 -52
- package/src/components/RouteCard/RouteCardEssentials.tsx +5 -3
- package/src/components/RouteCard/RouteCardSkeleton.tsx +3 -3
- package/src/components/RouteCard/RouteDetails.style.tsx +43 -0
- package/src/components/RouteCard/RouteDetails.tsx +214 -0
- package/src/components/RouteCard/RouteToken.style.tsx +9 -0
- package/src/components/RouteCard/RouteToken.tsx +68 -0
- package/src/components/RouteCard/RouteTokens.tsx +56 -0
- package/src/components/RouteCard/getMatchingLabels.ts +5 -0
- package/src/components/RouteCard/types.ts +2 -2
- package/src/components/Routes/Routes.tsx +5 -6
- package/src/components/Routes/RoutesContent.tsx +84 -81
- package/src/components/Routes/RoutesExpanded.style.ts +18 -17
- package/src/components/Routes/RoutesExpanded.tsx +77 -74
- package/src/components/Search/SearchInput.style.tsx +4 -43
- package/src/components/Search/SearchInput.tsx +8 -14
- package/src/components/Search/SearchNotFound.style.tsx +17 -20
- package/src/components/Search/SearchNotFound.tsx +3 -4
- package/src/components/SelectChainAndToken.tsx +17 -48
- package/src/components/SelectTokenButton/SelectTokenButton.style.tsx +53 -69
- package/src/components/SelectTokenButton/SelectTokenButton.tsx +10 -19
- package/src/components/SendToWallet/{SendToWallet.style.tsx → SendToWalletButton.style.tsx} +28 -2
- package/src/components/SendToWallet/SendToWalletButton.tsx +26 -19
- package/src/components/SendToWallet/SendToWalletExpandButton.tsx +45 -49
- package/src/components/SettingsListItemButton.tsx +6 -5
- package/src/components/Skeleton/WidgetSkeleton.style.tsx +45 -25
- package/src/components/Skeleton/WidgetSkeleton.tsx +12 -10
- package/src/components/Step/StepActions.style.tsx +33 -0
- package/src/components/Step/StepActions.tsx +329 -0
- package/src/components/StepActions/SentToWalletRow.style.tsx +29 -0
- package/src/components/StepActions/SentToWalletRow.tsx +56 -0
- package/src/components/StepActions/StepActionRow.style.tsx +18 -0
- package/src/components/StepActions/StepActionRow.tsx +30 -0
- package/src/components/StepActions/StepActionsList.tsx +40 -0
- package/src/components/StepActions/executionRows.tsx +86 -0
- package/src/components/Switch.tsx +6 -3
- package/src/components/Tabs/NavigationTabs.tsx +39 -31
- package/src/components/Tabs/Tabs.style.tsx +10 -5
- package/src/components/Timer/ExecutionTimerText.tsx +10 -0
- package/src/components/Timer/StepStatusTimer.style.tsx +98 -0
- package/src/components/Timer/StepStatusTimer.tsx +85 -0
- package/src/components/Token/Token.style.tsx +12 -4
- package/src/components/Token/Token.tsx +5 -5
- package/src/components/TokenList/PinTokenButton.tsx +2 -1
- package/src/components/TokenList/TokenDetailsSheet.tsx +9 -4
- package/src/components/TokenList/TokenDetailsSheetContent.style.tsx +16 -10
- package/src/components/TokenList/TokenDetailsSheetContent.tsx +17 -14
- package/src/components/TokenList/TokenList.style.tsx +26 -21
- package/src/components/TokenList/TokenListItem.tsx +2 -2
- package/src/components/TokenList/VirtualizedTokenList.tsx +1 -0
- package/src/components/TokenList/useTokenSelect.ts +15 -15
- package/src/components/TokenRate/TokenRate.style.ts +4 -1
- package/src/components/Tools/ToolItem.tsx +4 -5
- package/src/components/Tools/Tools.tsx +11 -11
- package/src/components/TransactionCard/ActiveTransactionCard.style.tsx +24 -0
- package/src/components/TransactionCard/ActiveTransactionCard.tsx +81 -0
- package/src/components/TransactionCard/TransactionCard.style.tsx +14 -0
- package/src/components/TransactionCard/TransactionCard.tsx +37 -0
- package/src/components/TransactionCard/TransactionCardSkeleton.tsx +68 -0
- package/src/config/queryClient.ts +1 -1
- package/src/config/version.ts +1 -1
- package/src/hooks/timer/useExecutionTimer.ts +21 -0
- package/src/hooks/timer/useInterval.ts +1 -1
- package/src/hooks/timer/validate.ts +2 -2
- package/src/hooks/useAccountsBalancesData.ts +4 -1
- package/src/hooks/useActionMessage.ts +6 -5
- package/src/hooks/useAddressValidation.ts +6 -1
- package/src/hooks/useAvailableChains.ts +6 -1
- package/src/hooks/useChain.ts +11 -1
- package/src/hooks/useChainSearch.ts +70 -0
- package/src/hooks/useChains.ts +12 -2
- package/src/hooks/useContactSupport.ts +16 -0
- package/src/hooks/useDebouncedWatch.ts +2 -2
- package/src/hooks/useDefaultElementId.ts +1 -1
- package/src/hooks/useExplorer.ts +78 -61
- package/src/hooks/useFilteredByTokenBalances.ts +4 -1
- package/src/hooks/useFromAmountThreshold.ts +4 -1
- package/src/hooks/useFromTokenSufficiency.ts +7 -2
- package/src/hooks/useGasRecommendation.ts +3 -3
- package/src/hooks/useGasRefuel.ts +9 -3
- package/src/hooks/useGasSufficiency.ts +8 -4
- package/src/hooks/useHasChainExpansion.ts +8 -5
- package/src/hooks/useHeader.ts +1 -1
- package/src/hooks/useInitializeSDKProviders.ts +1 -1
- package/src/hooks/useInitializer.ts +1 -1
- package/src/hooks/useIsBatchingSupported.ts +4 -1
- package/src/hooks/useLanguages.ts +6 -2
- package/src/hooks/useListHeight.ts +2 -2
- package/src/hooks/useLongPress.ts +10 -1
- package/src/hooks/useNavigateBack.ts +1 -1
- package/src/hooks/usePacedRouteExecution.ts +45 -0
- package/src/hooks/usePacedValue.ts +45 -0
- package/src/hooks/useRouteExecution.ts +35 -30
- package/src/hooks/useRouteExecutionMessage.ts +100 -0
- package/src/hooks/useRouteRequiredAccountConnection.ts +5 -1
- package/src/hooks/useRoutes.ts +32 -20
- package/src/hooks/useScrollableContainer.ts +5 -18
- package/src/hooks/useSetContentHeight.ts +2 -2
- package/src/hooks/useSettingMonitor.ts +15 -3
- package/src/hooks/useSwapOnly.ts +2 -5
- package/src/hooks/useToAddressAutoPopulate.ts +3 -5
- package/src/hooks/useToAddressRequirements.ts +30 -16
- package/src/hooks/useToAddressReset.ts +7 -24
- package/src/hooks/useToken.ts +5 -1
- package/src/hooks/useTokenAddressBalance.ts +7 -2
- package/src/hooks/useTokenBalance.ts +10 -1
- package/src/hooks/useTokenBalances.ts +10 -3
- package/src/hooks/useTokenBalancesQueries.ts +5 -1
- package/src/hooks/useTokenRateText.ts +55 -0
- package/src/hooks/useTokenSearch.ts +4 -1
- package/src/hooks/useTokens.ts +8 -1
- package/src/hooks/useTools.ts +1 -1
- package/src/hooks/useTransactionDetails.ts +6 -1
- package/src/hooks/useTransactionHistory.ts +54 -12
- package/src/hooks/useTransactionList.ts +83 -0
- package/src/hooks/useWideVariant.ts +3 -3
- package/src/hooks/useWidgetChains.ts +11 -1
- package/src/hooks/useWidgetEvents.ts +4 -9
- package/src/index.ts +5 -1
- package/src/pages/ActivitiesPage/ActiveTransactionItem.tsx +43 -0
- package/src/pages/ActivitiesPage/ActivitiesPage.tsx +148 -0
- package/src/pages/ActivitiesPage/ActivitiesPageMenuButton.tsx +71 -0
- package/src/pages/ActivitiesPage/TransactionHistoryEmpty.tsx +14 -0
- package/src/pages/ActivitiesPage/TransactionHistoryItem.tsx +30 -0
- package/src/pages/ActivitiesPage/types.ts +16 -0
- package/src/pages/LanguagesPage.tsx +1 -4
- package/src/pages/MainPage/MainPage.tsx +15 -20
- package/src/pages/MainPage/ReviewButton.tsx +8 -7
- package/src/pages/RoutesPage/RoutesPage.style.ts +4 -1
- package/src/pages/RoutesPage/RoutesPage.tsx +8 -3
- package/src/pages/SelectChainPage/SelectChainPage.tsx +2 -8
- package/src/pages/SelectEnabledToolsPage.tsx +31 -35
- package/src/pages/SelectTokenPage/SearchTokenInput.tsx +4 -2
- package/src/pages/SelectTokenPage/SelectTokenPage.tsx +9 -12
- package/src/pages/SendToWallet/BookmarkAddressSheet.tsx +10 -7
- package/src/pages/SendToWallet/BookmarksPage.tsx +64 -116
- package/src/pages/SendToWallet/ConfirmAddressSheet.tsx +9 -11
- package/src/pages/SendToWallet/ConnectedWalletsPage.tsx +59 -97
- package/src/pages/SendToWallet/RecentWalletsPage.tsx +68 -124
- package/src/pages/SendToWallet/SendToConfiguredWalletPage.tsx +45 -91
- package/src/pages/SendToWallet/SendToWalletPage.style.tsx +61 -82
- package/src/pages/SendToWallet/SendToWalletPage.tsx +5 -7
- package/src/pages/SettingsPage/BridgeAndExchangeSettings.tsx +1 -2
- package/src/pages/SettingsPage/LanguageSetting.tsx +1 -2
- package/src/pages/SettingsPage/ResetSettingsButton.style.tsx +10 -8
- package/src/pages/SettingsPage/ResetSettingsButton.tsx +20 -18
- package/src/pages/SettingsPage/SettingsCard/SettingCard.style.tsx +7 -2
- package/src/pages/SettingsPage/SettingsCard/SettingCardExpandable.tsx +58 -55
- package/src/pages/SettingsPage/SettingsCard/SettingsAccordian.tsx +10 -7
- package/src/pages/SettingsPage/SettingsPage.tsx +4 -6
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.style.tsx +60 -55
- package/src/pages/SettingsPage/ThemeSettings.tsx +1 -2
- package/src/pages/TransactionDetailsPage/ContactSupportButton.style.tsx +12 -0
- package/src/pages/TransactionDetailsPage/ContactSupportButton.tsx +7 -18
- package/src/pages/TransactionDetailsPage/ReceiptsCard.tsx +22 -0
- package/src/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +31 -74
- package/src/pages/TransactionDetailsPage/TransactionDetailsSkeleton.tsx +3 -2
- package/src/pages/TransactionDetailsPage/TransferIdCard.tsx +16 -9
- package/src/pages/TransactionPage/ConfirmToAddressSheet.tsx +9 -7
- package/src/pages/TransactionPage/ExchangeRateBottomSheet.style.tsx +9 -0
- package/src/pages/TransactionPage/ExchangeRateBottomSheet.tsx +29 -35
- package/src/pages/TransactionPage/ExecutionDoneCard.tsx +43 -0
- package/src/pages/TransactionPage/RouteTracker.tsx +2 -2
- package/src/pages/TransactionPage/TokenValueBottomSheet.style.tsx +60 -0
- package/src/pages/TransactionPage/TokenValueBottomSheet.tsx +73 -125
- package/src/pages/TransactionPage/TransactionContent.tsx +42 -0
- package/src/pages/TransactionPage/TransactionDoneButtons.tsx +70 -0
- package/src/pages/TransactionPage/TransactionExecutionContent.tsx +95 -0
- package/src/pages/TransactionPage/TransactionFailedButtons.tsx +105 -0
- package/src/pages/TransactionPage/TransactionPage.tsx +38 -202
- package/src/pages/TransactionPage/TransactionReview.tsx +163 -0
- package/src/pages/TransactionPage/utils.ts +2 -2
- package/src/providers/I18nProvider/I18nProvider.tsx +0 -1
- package/src/providers/I18nProvider/i18n.ts +2 -2
- package/src/providers/QueryClientProvider.tsx +2 -2
- package/src/providers/SDKClientProvider.tsx +8 -11
- package/src/providers/WalletProvider/WalletProvider.tsx +8 -2
- package/src/providers/WalletProvider/useExternalWalletProvider.ts +9 -1
- package/src/providers/WidgetProvider/WidgetProvider.tsx +6 -7
- package/src/stores/StoreProvider.tsx +3 -10
- package/src/stores/bookmarks/BookmarkStore.tsx +5 -5
- package/src/stores/bookmarks/createBookmarkStore.ts +2 -1
- package/src/stores/bookmarks/useBookmarkActions.ts +1 -1
- package/src/stores/chains/ChainOrderStore.tsx +8 -12
- package/src/stores/chains/createChainOrderStore.ts +6 -3
- package/src/stores/form/FormStore.tsx +2 -2
- package/src/stores/form/FormStoreContext.ts +3 -2
- package/src/stores/form/FormUpdater.tsx +0 -6
- package/src/stores/form/URLSearchParamsBuilder.tsx +0 -4
- package/src/stores/form/createFormStore.ts +4 -1
- package/src/stores/form/useClearAmountFields.ts +10 -0
- package/src/stores/form/useFieldActions.ts +7 -2
- package/src/stores/form/useFieldValues.ts +3 -1
- package/src/stores/form/useFormRef.ts +25 -11
- package/src/stores/form/useFormStore.ts +2 -2
- package/src/stores/form/useTouchedFields.ts +2 -1
- package/src/stores/header/useHeaderStore.tsx +9 -9
- package/src/stores/inputMode/useInputModeStore.ts +20 -18
- package/src/stores/navigationTabs/types.ts +27 -0
- package/src/stores/navigationTabs/useNavigationTabLabel.ts +28 -0
- package/src/stores/navigationTabs/useNavigationTabsStore.tsx +108 -0
- package/src/stores/navigationTabs/utils.ts +134 -0
- package/src/stores/pinnedTokens/PinnedTokensStore.tsx +5 -5
- package/src/stores/pinnedTokens/createPinnedTokensStore.ts +4 -1
- package/src/stores/routes/RouteExecutionStore.tsx +6 -6
- package/src/stores/routes/createRouteExecutionStore.ts +59 -44
- package/src/stores/routes/types.ts +4 -1
- package/src/stores/routes/useIntermediateRoutesStore.ts +17 -16
- package/src/stores/routes/useRouteExecutionIndicator.ts +43 -0
- package/src/stores/routes/useSetExecutableRoute.ts +5 -3
- package/src/stores/routes/utils.ts +7 -7
- package/src/stores/settings/SettingsStore.tsx +7 -6
- package/src/stores/settings/createSettingsStore.ts +52 -21
- package/src/stores/settings/types.ts +1 -25
- package/src/stores/settings/useSettingsActions.ts +14 -6
- package/src/themes/azureLight.ts +2 -2
- package/src/themes/createTheme.ts +28 -35
- package/src/themes/jumper.ts +1 -1
- package/src/themes/types.ts +0 -12
- package/src/themes/utils.ts +1 -1
- package/src/themes/watermelonLight.ts +2 -2
- package/src/types/events.ts +26 -31
- package/src/types/widget.ts +113 -67
- package/src/utils/compactNumberFormatter.ts +1 -1
- package/src/utils/converters.ts +4 -2
- package/src/utils/currencyExtendedFormatter.ts +1 -1
- package/src/utils/deepEqual.ts +1 -1
- package/src/utils/deepMerge.ts +2 -2
- package/src/utils/elements.ts +8 -6
- package/src/utils/enum.ts +4 -2
- package/src/utils/fees.ts +8 -2
- package/src/utils/format.ts +8 -5
- package/src/utils/getActionMessage.ts +13 -18
- package/src/utils/getErrorMessage.ts +1 -1
- package/src/utils/getPriceImpact.ts +1 -1
- package/src/utils/input.ts +1 -1
- package/src/utils/item.ts +1 -1
- package/src/utils/mode.ts +13 -0
- package/src/utils/navigationRoutes.ts +6 -9
- package/src/utils/percentFormatter.ts +4 -1
- package/src/utils/timer.ts +10 -0
- package/src/utils/token.ts +16 -1
- package/src/utils/tokenList.ts +8 -4
- package/src/utils/wallet.ts +1 -1
- package/dist/esm/AppDefault.d.ts +0 -9
- package/dist/esm/AppDrawerContext.d.ts +0 -5
- package/dist/esm/AppLayout.d.ts +0 -1
- package/dist/esm/AppProvider.d.ts +0 -3
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.d.ts +0 -4
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js +0 -65
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js.map +0 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.d.ts +0 -2
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.js +0 -24
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.js.map +0 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +0 -2
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.js +0 -22
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.js.map +0 -1
- package/dist/esm/components/AmountInput/AmountInput.d.ts +0 -3
- package/dist/esm/components/AmountInput/AmountInput.style.d.ts +0 -9
- package/dist/esm/components/AmountInput/AmountInputAdornment.style.d.ts +0 -2
- package/dist/esm/components/AmountInput/AmountInputAdornment.style.js +0 -67
- package/dist/esm/components/AmountInput/AmountInputAdornment.style.js.map +0 -1
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.d.ts +0 -2
- package/dist/esm/components/AmountInput/AmountInputStartAdornment.d.ts +0 -2
- package/dist/esm/components/AmountInput/PriceFormHelperText.d.ts +0 -2
- package/dist/esm/components/AmountInput/PriceFormHelperText.style.d.ts +0 -1
- package/dist/esm/components/AppContainer.d.ts +0 -10
- package/dist/esm/components/Avatar/AccountAvatar.d.ts +0 -10
- package/dist/esm/components/Avatar/Avatar.d.ts +0 -11
- package/dist/esm/components/Avatar/Avatar.style.d.ts +0 -15
- package/dist/esm/components/Avatar/ChainBadgeContent.d.ts +0 -7
- package/dist/esm/components/Avatar/SmallAvatar.d.ts +0 -8
- package/dist/esm/components/Avatar/TokenAvatar.d.ts +0 -10
- package/dist/esm/components/Avatar/utils.d.ts +0 -1
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.d.ts +0 -2
- package/dist/esm/components/BaseTransactionButton/types.d.ts +0 -8
- package/dist/esm/components/BaseTransactionButton/types.js +0 -2
- package/dist/esm/components/BaseTransactionButton/types.js.map +0 -1
- package/dist/esm/components/BottomSheet/BottomSheet.d.ts +0 -2
- package/dist/esm/components/BottomSheet/types.d.ts +0 -12
- package/dist/esm/components/BottomSheet/types.js +0 -2
- package/dist/esm/components/BottomSheet/types.js.map +0 -1
- package/dist/esm/components/ButtonTertiary.d.ts +0 -1
- package/dist/esm/components/Card/Card.d.ts +0 -7
- package/dist/esm/components/Card/CardButton.d.ts +0 -7
- package/dist/esm/components/Card/CardButton.style.d.ts +0 -3
- package/dist/esm/components/Card/CardHeader.d.ts +0 -1
- package/dist/esm/components/Card/CardIconButton.d.ts +0 -4
- package/dist/esm/components/Card/CardLabel.d.ts +0 -6
- package/dist/esm/components/Card/CardTitle.d.ts +0 -3
- package/dist/esm/components/Card/InputCard.d.ts +0 -1
- package/dist/esm/components/ChainSelect/ChainSelect.d.ts +0 -2
- package/dist/esm/components/ChainSelect/ChainSelect.style.d.ts +0 -7
- package/dist/esm/components/ChainSelect/useChainSelect.d.ts +0 -10
- package/dist/esm/components/Chains/AllChainsAvatar.d.ts +0 -7
- package/dist/esm/components/Chains/ChainList.d.ts +0 -15
- package/dist/esm/components/Chains/ChainList.style.d.ts +0 -14
- package/dist/esm/components/Chains/ChainListItem.d.ts +0 -14
- package/dist/esm/components/Chains/ChainSearchInput.d.ts +0 -10
- package/dist/esm/components/Chains/ChainSearchInput.js +0 -25
- package/dist/esm/components/Chains/ChainSearchInput.js.map +0 -1
- package/dist/esm/components/Chains/ChainsExpanded.d.ts +0 -7
- package/dist/esm/components/Chains/ChainsExpanded.style.d.ts +0 -6
- package/dist/esm/components/Chains/PinChainButton.d.ts +0 -7
- package/dist/esm/components/Chains/SelectChainContent.d.ts +0 -9
- package/dist/esm/components/Chains/SelectChainContent.js +0 -60
- package/dist/esm/components/Chains/SelectChainContent.js.map +0 -1
- package/dist/esm/components/Chains/VirtualizedChainList.d.ts +0 -15
- package/dist/esm/components/ContractComponent/ContractComponent.d.ts +0 -3
- package/dist/esm/components/ContractComponent/NFT/NFT.style.d.ts +0 -1
- package/dist/esm/components/ContractComponent/NFT/types.js +0 -2
- package/dist/esm/components/ContractComponent/NFT/types.js.map +0 -1
- package/dist/esm/components/Dialog.d.ts +0 -27
- package/dist/esm/components/Dialog.js +0 -32
- package/dist/esm/components/Dialog.js.map +0 -1
- package/dist/esm/components/Expansion/Expansion.d.ts +0 -1
- package/dist/esm/components/Expansion/Expansion.style.d.ts +0 -32
- package/dist/esm/components/Expansion/ExpansionTransition.d.ts +0 -8
- package/dist/esm/components/FeeBreakdownTooltip.d.ts +0 -10
- package/dist/esm/components/FullPageContainer.d.ts +0 -2
- package/dist/esm/components/FullPageContainer.js +0 -9
- package/dist/esm/components/FullPageContainer.js.map +0 -1
- package/dist/esm/components/Header/BackButton.d.ts +0 -1
- package/dist/esm/components/Header/CloseDrawerButton.d.ts +0 -5
- package/dist/esm/components/Header/DisconnectIconButton.d.ts +0 -4
- package/dist/esm/components/Header/Header.d.ts +0 -2
- package/dist/esm/components/Header/Header.style.d.ts +0 -13
- package/dist/esm/components/Header/NavigationHeader.d.ts +0 -1
- package/dist/esm/components/Header/SettingsButton.d.ts +0 -1
- package/dist/esm/components/Header/SettingsButton.style.d.ts +0 -6
- package/dist/esm/components/Header/SplitNavigationTabs.d.ts +0 -1
- package/dist/esm/components/Header/SplitNavigationTabs.js +0 -21
- package/dist/esm/components/Header/SplitNavigationTabs.js.map +0 -1
- package/dist/esm/components/Header/TransactionHistoryButton.d.ts +0 -1
- package/dist/esm/components/Header/TransactionHistoryButton.js +0 -12
- package/dist/esm/components/Header/TransactionHistoryButton.js.map +0 -1
- package/dist/esm/components/Header/WalletHeader.d.ts +0 -1
- package/dist/esm/components/Header/WalletMenu.d.ts +0 -3
- package/dist/esm/components/Header/WalletMenu.style.d.ts +0 -1
- package/dist/esm/components/IconTypography.d.ts +0 -1
- package/dist/esm/components/Initializer.d.ts +0 -1
- package/dist/esm/components/Input.d.ts +0 -1
- package/dist/esm/components/ListItem/ListItem.d.ts +0 -1
- package/dist/esm/components/ListItem/ListItemButton.d.ts +0 -1
- package/dist/esm/components/ListItemButton.d.ts +0 -1
- package/dist/esm/components/ListItemText.d.ts +0 -1
- package/dist/esm/components/Menu.d.ts +0 -1
- package/dist/esm/components/Messages/AccountDeployedMessage.d.ts +0 -2
- package/dist/esm/components/Messages/AccountNotDeployedMessage.d.ts +0 -2
- package/dist/esm/components/Messages/AlertMessage.d.ts +0 -11
- package/dist/esm/components/Messages/AlertMessage.style.d.ts +0 -7
- package/dist/esm/components/Messages/FundsSufficiencyMessage.d.ts +0 -2
- package/dist/esm/components/Messages/GasRefuelMessage.d.ts +0 -2
- package/dist/esm/components/Messages/GasRefuelMessage.style.d.ts +0 -1
- package/dist/esm/components/Messages/GasSufficiencyMessage.d.ts +0 -7
- package/dist/esm/components/Messages/MinFromAmountUSDMessage.d.ts +0 -6
- package/dist/esm/components/Messages/MissingRouteRequiredAccountMessage.d.ts +0 -8
- package/dist/esm/components/Messages/ToAddressRequiredMessage.d.ts +0 -2
- package/dist/esm/components/Messages/ToAddressRequiredMessage.js +0 -13
- package/dist/esm/components/Messages/ToAddressRequiredMessage.js.map +0 -1
- package/dist/esm/components/Messages/WarningMessages.d.ts +0 -8
- package/dist/esm/components/Messages/types.d.ts +0 -1
- package/dist/esm/components/Messages/types.js +0 -2
- package/dist/esm/components/Messages/types.js.map +0 -1
- package/dist/esm/components/Messages/useMessageQueue.d.ts +0 -12
- package/dist/esm/components/NotFound.d.ts +0 -1
- package/dist/esm/components/PageContainer.d.ts +0 -7
- package/dist/esm/components/PageEntered.d.ts +0 -1
- package/dist/esm/components/PoweredBy/PoweredBy.d.ts +0 -1
- package/dist/esm/components/PoweredBy/PoweredBy.style.d.ts +0 -1
- package/dist/esm/components/ProgressToNextUpdate.d.ts +0 -6
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.d.ts +0 -3
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +0 -3
- package/dist/esm/components/RouteCard/RouteCard.d.ts +0 -3
- package/dist/esm/components/RouteCard/RouteCard.style.d.ts +0 -1
- package/dist/esm/components/RouteCard/RouteCard.style.js +0 -8
- package/dist/esm/components/RouteCard/RouteCard.style.js.map +0 -1
- package/dist/esm/components/RouteCard/RouteCardEssentials.d.ts +0 -2
- package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.d.ts +0 -2
- package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js +0 -29
- package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js.map +0 -1
- package/dist/esm/components/RouteCard/RouteCardSkeleton.d.ts +0 -3
- package/dist/esm/components/RouteCard/RouteNotFoundCard.d.ts +0 -1
- package/dist/esm/components/RouteCard/getMatchingLabels.d.ts +0 -3
- package/dist/esm/components/RouteCard/types.d.ts +0 -13
- package/dist/esm/components/RouteCard/types.js +0 -2
- package/dist/esm/components/RouteCard/types.js.map +0 -1
- package/dist/esm/components/Routes/Routes.d.ts +0 -2
- package/dist/esm/components/Routes/RoutesContent.d.ts +0 -13
- package/dist/esm/components/Routes/RoutesExpanded.d.ts +0 -6
- package/dist/esm/components/Routes/RoutesExpanded.style.d.ts +0 -8
- package/dist/esm/components/Search/SearchInput.d.ts +0 -15
- package/dist/esm/components/Search/SearchInput.style.d.ts +0 -11
- package/dist/esm/components/Search/SearchNotFound.d.ts +0 -6
- package/dist/esm/components/Search/SearchNotFound.style.d.ts +0 -8
- package/dist/esm/components/SelectChainAndToken.d.ts +0 -2
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.d.ts +0 -5
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.d.ts +0 -11
- package/dist/esm/components/SendToWallet/SendToWallet.style.d.ts +0 -3
- package/dist/esm/components/SendToWallet/SendToWallet.style.js +0 -55
- package/dist/esm/components/SendToWallet/SendToWallet.style.js.map +0 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.d.ts +0 -2
- package/dist/esm/components/SendToWallet/SendToWalletExpandButton.d.ts +0 -1
- package/dist/esm/components/SettingsListItemButton.d.ts +0 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.d.ts +0 -11
- package/dist/esm/components/Step/CircularProgress.d.ts +0 -4
- package/dist/esm/components/Step/CircularProgress.js +0 -26
- package/dist/esm/components/Step/CircularProgress.js.map +0 -1
- package/dist/esm/components/Step/CircularProgress.style.d.ts +0 -7
- package/dist/esm/components/Step/CircularProgress.style.js +0 -81
- package/dist/esm/components/Step/CircularProgress.style.js.map +0 -1
- package/dist/esm/components/Step/DestinationWalletAddress.d.ts +0 -6
- package/dist/esm/components/Step/DestinationWalletAddress.js +0 -33
- package/dist/esm/components/Step/DestinationWalletAddress.js.map +0 -1
- package/dist/esm/components/Step/Step.d.ts +0 -8
- package/dist/esm/components/Step/Step.js +0 -73
- package/dist/esm/components/Step/Step.js.map +0 -1
- package/dist/esm/components/Step/StepAction.d.ts +0 -5
- package/dist/esm/components/Step/StepAction.js +0 -45
- package/dist/esm/components/Step/StepAction.js.map +0 -1
- package/dist/esm/components/Step/StepList.d.ts +0 -3
- package/dist/esm/components/Step/StepList.js +0 -34
- package/dist/esm/components/Step/StepList.js.map +0 -1
- package/dist/esm/components/StepActions/StepActions.d.ts +0 -2
- package/dist/esm/components/StepActions/StepActions.js +0 -155
- package/dist/esm/components/StepActions/StepActions.js.map +0 -1
- package/dist/esm/components/StepActions/StepActions.style.d.ts +0 -10
- package/dist/esm/components/StepActions/StepActions.style.js +0 -64
- package/dist/esm/components/StepActions/StepActions.style.js.map +0 -1
- package/dist/esm/components/StepActions/types.d.ts +0 -17
- package/dist/esm/components/StepActions/types.js +0 -2
- package/dist/esm/components/StepActions/types.js.map +0 -1
- package/dist/esm/components/StepDivider/StepDivider.d.ts +0 -1
- package/dist/esm/components/StepDivider/StepDivider.js +0 -7
- package/dist/esm/components/StepDivider/StepDivider.js.map +0 -1
- package/dist/esm/components/StepDivider/StepDivider.style.d.ts +0 -1
- package/dist/esm/components/StepDivider/StepDivider.style.js +0 -8
- package/dist/esm/components/StepDivider/StepDivider.style.js.map +0 -1
- package/dist/esm/components/Switch.d.ts +0 -1
- package/dist/esm/components/Tabs/NavigationTabs.d.ts +0 -4
- package/dist/esm/components/Tabs/Tabs.style.d.ts +0 -4
- package/dist/esm/components/TextFitter/TextFitter.d.ts +0 -3
- package/dist/esm/components/TextFitter/types.d.ts +0 -12
- package/dist/esm/components/TextFitter/types.js +0 -2
- package/dist/esm/components/TextFitter/types.js.map +0 -1
- package/dist/esm/components/Timer/StepTimer.d.ts +0 -5
- package/dist/esm/components/Timer/StepTimer.js +0 -57
- package/dist/esm/components/Timer/StepTimer.js.map +0 -1
- package/dist/esm/components/Timer/TimerContent.d.ts +0 -2
- package/dist/esm/components/Timer/TimerContent.js +0 -17
- package/dist/esm/components/Timer/TimerContent.js.map +0 -1
- package/dist/esm/components/Token/Token.d.ts +0 -15
- package/dist/esm/components/Token/Token.style.d.ts +0 -5
- package/dist/esm/components/TokenList/PinTokenButton.d.ts +0 -6
- package/dist/esm/components/TokenList/TokenDetailsSheet.d.ts +0 -2
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.d.ts +0 -8
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.style.d.ts +0 -5
- package/dist/esm/components/TokenList/TokenList.d.ts +0 -3
- package/dist/esm/components/TokenList/TokenList.style.d.ts +0 -7
- package/dist/esm/components/TokenList/TokenListItem.d.ts +0 -3
- package/dist/esm/components/TokenList/TokenNotFound.d.ts +0 -2
- package/dist/esm/components/TokenList/VirtualizedTokenList.d.ts +0 -3
- package/dist/esm/components/TokenList/types.d.ts +0 -51
- package/dist/esm/components/TokenList/types.js +0 -2
- package/dist/esm/components/TokenList/types.js.map +0 -1
- package/dist/esm/components/TokenList/useTokenSelect.d.ts +0 -2
- package/dist/esm/components/TokenRate/TokenRate.d.ts +0 -7
- package/dist/esm/components/TokenRate/TokenRate.style.d.ts +0 -1
- package/dist/esm/components/Tools/ToolItem.d.ts +0 -8
- package/dist/esm/components/Tools/Tools.d.ts +0 -8
- package/dist/esm/components/TransactionDetails.d.ts +0 -7
- package/dist/esm/components/TransactionDetails.js +0 -117
- package/dist/esm/components/TransactionDetails.js.map +0 -1
- package/dist/esm/config/queryClient.d.ts +0 -2
- package/dist/esm/hooks/timer/time.d.ts +0 -11
- package/dist/esm/hooks/timer/useInterval.d.ts +0 -1
- package/dist/esm/hooks/timer/useTimer.d.ts +0 -19
- package/dist/esm/hooks/timer/validate.d.ts +0 -2
- package/dist/esm/hooks/useAccountsBalancesData.d.ts +0 -6
- package/dist/esm/hooks/useActionMessage.d.ts +0 -5
- package/dist/esm/hooks/useAddressActivity.d.ts +0 -8
- package/dist/esm/hooks/useAddressValidation.d.ts +0 -25
- package/dist/esm/hooks/useAvailableChains.d.ts +0 -10
- package/dist/esm/hooks/useChain.d.ts +0 -5
- package/dist/esm/hooks/useChains.d.ts +0 -7
- package/dist/esm/hooks/useDebouncedWatch.d.ts +0 -2
- package/dist/esm/hooks/useDefaultElementId.d.ts +0 -1
- package/dist/esm/hooks/useExplorer.d.ts +0 -15
- package/dist/esm/hooks/useFilteredByTokenBalances.d.ts +0 -9
- package/dist/esm/hooks/useFromAmountThreshold.d.ts +0 -4
- package/dist/esm/hooks/useFromTokenSufficiency.d.ts +0 -5
- package/dist/esm/hooks/useGasRecommendation.d.ts +0 -2
- package/dist/esm/hooks/useGasRefuel.d.ts +0 -7
- package/dist/esm/hooks/useGasSufficiency.d.ts +0 -13
- package/dist/esm/hooks/useHasChainExpansion.d.ts +0 -2
- package/dist/esm/hooks/useHeader.d.ts +0 -2
- package/dist/esm/hooks/useInitializeSDKProviders.d.ts +0 -1
- package/dist/esm/hooks/useInitializer.d.ts +0 -1
- package/dist/esm/hooks/useIsBatchingSupported.d.ts +0 -5
- package/dist/esm/hooks/useIsContractAddress.d.ts +0 -7
- package/dist/esm/hooks/useLanguages.d.ts +0 -5
- package/dist/esm/hooks/useListHeight.d.ts +0 -9
- package/dist/esm/hooks/useLongPress.d.ts +0 -7
- package/dist/esm/hooks/useNavigateBack.d.ts +0 -1
- package/dist/esm/hooks/useRouteExecution.d.ts +0 -14
- package/dist/esm/hooks/useRouteRequiredAccountConnection.d.ts +0 -10
- package/dist/esm/hooks/useRoutes.d.ts +0 -18
- package/dist/esm/hooks/useScrollableContainer.d.ts +0 -3
- package/dist/esm/hooks/useSetContentHeight.d.ts +0 -2
- package/dist/esm/hooks/useSettingMonitor.d.ts +0 -13
- package/dist/esm/hooks/useSwapOnly.d.ts +0 -1
- package/dist/esm/hooks/useToAddressAutoPopulate.d.ts +0 -13
- package/dist/esm/hooks/useToAddressRequirements.d.ts +0 -12
- package/dist/esm/hooks/useToAddressReset.d.ts +0 -4
- package/dist/esm/hooks/useToken.d.ts +0 -4
- package/dist/esm/hooks/useTokenAddressBalance.d.ts +0 -7
- package/dist/esm/hooks/useTokenBalance.d.ts +0 -9
- package/dist/esm/hooks/useTokenBalances.d.ts +0 -9
- package/dist/esm/hooks/useTokenBalancesQueries.d.ts +0 -11
- package/dist/esm/hooks/useTokenSearch.d.ts +0 -6
- package/dist/esm/hooks/useTokens.d.ts +0 -8
- package/dist/esm/hooks/useTools.d.ts +0 -4
- package/dist/esm/hooks/useTransactionDetails.d.ts +0 -4
- package/dist/esm/hooks/useTransactionHistory.d.ts +0 -5
- package/dist/esm/hooks/useWideVariant.d.ts +0 -1
- package/dist/esm/icons/lifi.d.ts +0 -1
- package/dist/esm/icons/lifi.js +0 -2
- package/dist/esm/icons/lifi.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.d.ts +0 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js +0 -26
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js.map +0 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.d.ts +0 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +0 -37
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js.map +0 -1
- package/dist/esm/pages/LanguagesPage.d.ts +0 -1
- package/dist/esm/pages/MainPage/MainPage.d.ts +0 -1
- package/dist/esm/pages/MainPage/MainWarningMessages.d.ts +0 -7
- package/dist/esm/pages/MainPage/ReviewButton.d.ts +0 -1
- package/dist/esm/pages/RoutesPage/RoutesPage.d.ts +0 -1
- package/dist/esm/pages/RoutesPage/RoutesPage.style.d.ts +0 -1
- package/dist/esm/pages/SelectChainPage/SelectChainPage.d.ts +0 -2
- package/dist/esm/pages/SelectChainPage/types.d.ts +0 -4
- package/dist/esm/pages/SelectChainPage/types.js +0 -2
- package/dist/esm/pages/SelectChainPage/types.js.map +0 -1
- package/dist/esm/pages/SelectEnabledToolsPage.d.ts +0 -3
- package/dist/esm/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -6
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.d.ts +0 -3
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.d.ts +0 -8
- package/dist/esm/pages/SendToWallet/BookmarksPage.d.ts +0 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.d.ts +0 -8
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.d.ts +0 -1
- package/dist/esm/pages/SendToWallet/EmptyListIndicator.d.ts +0 -6
- package/dist/esm/pages/SendToWallet/EmptyListIndicator.js +0 -9
- package/dist/esm/pages/SendToWallet/EmptyListIndicator.js.map +0 -1
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.d.ts +0 -1
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.d.ts +0 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.d.ts +0 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.d.ts +0 -22
- package/dist/esm/pages/SendToWallet/types.d.ts +0 -4
- package/dist/esm/pages/SendToWallet/types.js +0 -2
- package/dist/esm/pages/SendToWallet/types.js.map +0 -1
- package/dist/esm/pages/SettingsPage/BridgeAndExchangeSettings.d.ts +0 -3
- package/dist/esm/pages/SettingsPage/GasPriceSettings.d.ts +0 -1
- package/dist/esm/pages/SettingsPage/LanguageSetting.d.ts +0 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.d.ts +0 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.d.ts +0 -1
- package/dist/esm/pages/SettingsPage/RoutePrioritySettings.d.ts +0 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/BadgedValue.d.ts +0 -8
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +0 -2
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.d.ts +0 -17
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingsAccordian.d.ts +0 -6
- package/dist/esm/pages/SettingsPage/SettingsCard/types.d.ts +0 -5
- package/dist/esm/pages/SettingsPage/SettingsCard/types.js +0 -2
- package/dist/esm/pages/SettingsPage/SettingsCard/types.js.map +0 -1
- package/dist/esm/pages/SettingsPage/SettingsPage.d.ts +0 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.d.ts +0 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.d.ts +0 -9
- package/dist/esm/pages/SettingsPage/SmallBalanceFilterSettings.d.ts +0 -1
- package/dist/esm/pages/SettingsPage/ThemeSettings.d.ts +0 -1
- package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.d.ts +0 -5
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.d.ts +0 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.d.ts +0 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.d.ts +0 -6
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.d.ts +0 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js +0 -26
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js.map +0 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.d.ts +0 -5
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js +0 -72
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +0 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryPage.d.ts +0 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryPage.js +0 -50
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryPage.js.map +0 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.d.ts +0 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +0 -27
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js.map +0 -1
- package/dist/esm/pages/TransactionHistoryPage/constants.d.ts +0 -1
- package/dist/esm/pages/TransactionHistoryPage/constants.js +0 -2
- package/dist/esm/pages/TransactionHistoryPage/constants.js.map +0 -1
- package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.d.ts +0 -8
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.d.ts +0 -13
- package/dist/esm/pages/TransactionPage/RouteTracker.d.ts +0 -8
- package/dist/esm/pages/TransactionPage/StartTransactionButton.d.ts +0 -2
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.d.ts +0 -2
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js +0 -182
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js.map +0 -1
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.style.d.ts +0 -8
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.style.js +0 -68
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.style.js.map +0 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.d.ts +0 -9
- package/dist/esm/pages/TransactionPage/TransactionPage.d.ts +0 -1
- package/dist/esm/pages/TransactionPage/types.d.ts +0 -5
- package/dist/esm/pages/TransactionPage/types.js +0 -2
- package/dist/esm/pages/TransactionPage/types.js.map +0 -1
- package/dist/esm/pages/TransactionPage/utils.d.ts +0 -2
- package/dist/esm/providers/I18nProvider/I18nProvider.d.ts +0 -1
- package/dist/esm/providers/I18nProvider/constants.d.ts +0 -3
- package/dist/esm/providers/I18nProvider/enResource.js.map +0 -1
- package/dist/esm/providers/I18nProvider/i18n.d.ts +0 -3
- package/dist/esm/providers/I18nProvider/types.js +0 -2
- package/dist/esm/providers/I18nProvider/types.js.map +0 -1
- package/dist/esm/providers/QueryClientProvider.d.ts +0 -2
- package/dist/esm/providers/SDKClientProvider.d.ts +0 -4
- package/dist/esm/providers/ThemeProvider/ThemeProvider.d.ts +0 -1
- package/dist/esm/providers/WalletProvider/WalletProvider.d.ts +0 -7
- package/dist/esm/providers/WalletProvider/useExternalWalletProvider.d.ts +0 -8
- package/dist/esm/providers/WidgetProvider/WidgetProvider.d.ts +0 -3
- package/dist/esm/providers/WidgetProvider/types.d.ts +0 -7
- package/dist/esm/providers/WidgetProvider/types.js +0 -2
- package/dist/esm/providers/WidgetProvider/types.js.map +0 -1
- package/dist/esm/stores/StoreProvider.d.ts +0 -3
- package/dist/esm/stores/bookmarks/BookmarkStore.d.ts +0 -4
- package/dist/esm/stores/bookmarks/createBookmarkStore.d.ts +0 -26
- package/dist/esm/stores/bookmarks/types.js +0 -2
- package/dist/esm/stores/bookmarks/types.js.map +0 -1
- package/dist/esm/stores/bookmarks/useBookmarkActions.d.ts +0 -2
- package/dist/esm/stores/bookmarks/useBookmarks.d.ts +0 -2
- package/dist/esm/stores/chains/ChainOrderStore.d.ts +0 -4
- package/dist/esm/stores/chains/createChainOrderStore.d.ts +0 -30
- package/dist/esm/stores/chains/types.d.ts +0 -24
- package/dist/esm/stores/chains/types.js +0 -2
- package/dist/esm/stores/chains/types.js.map +0 -1
- package/dist/esm/stores/chains/useChainOrder.d.ts +0 -2
- package/dist/esm/stores/form/FormStore.d.ts +0 -7
- package/dist/esm/stores/form/FormStoreContext.d.ts +0 -2
- package/dist/esm/stores/form/FormUpdater.d.ts +0 -4
- package/dist/esm/stores/form/URLSearchParamsBuilder.d.ts +0 -1
- package/dist/esm/stores/form/createFormStore.d.ts +0 -3
- package/dist/esm/stores/form/getDefaultValuesFromQueryString.d.ts +0 -7
- package/dist/esm/stores/form/useFormRef.d.ts +0 -3
- package/dist/esm/stores/form/useFormStore.d.ts +0 -2
- package/dist/esm/stores/form/useTouchedFields.d.ts +0 -11
- package/dist/esm/stores/header/types.d.ts +0 -18
- package/dist/esm/stores/header/types.js +0 -2
- package/dist/esm/stores/header/types.js.map +0 -1
- package/dist/esm/stores/header/useHeaderStore.d.ts +0 -10
- package/dist/esm/stores/inputMode/useInputModeStore.d.ts +0 -9
- package/dist/esm/stores/pinnedTokens/PinnedTokensStore.d.ts +0 -4
- package/dist/esm/stores/pinnedTokens/createPinnedTokensStore.d.ts +0 -19
- package/dist/esm/stores/pinnedTokens/types.d.ts +0 -17
- package/dist/esm/stores/pinnedTokens/types.js +0 -2
- package/dist/esm/stores/pinnedTokens/types.js.map +0 -1
- package/dist/esm/stores/routes/RouteExecutionStore.d.ts +0 -8
- package/dist/esm/stores/routes/createRouteExecutionStore.d.ts +0 -19
- package/dist/esm/stores/routes/types.d.ts +0 -20
- package/dist/esm/stores/routes/types.js +0 -10
- package/dist/esm/stores/routes/types.js.map +0 -1
- package/dist/esm/stores/routes/useExecutingRoutesIds.d.ts +0 -1
- package/dist/esm/stores/routes/useExecutingRoutesIds.js +0 -15
- package/dist/esm/stores/routes/useExecutingRoutesIds.js.map +0 -1
- package/dist/esm/stores/routes/useIntermediateRoutesStore.d.ts +0 -8
- package/dist/esm/stores/routes/useSetExecutableRoute.d.ts +0 -1
- package/dist/esm/stores/routes/utils.d.ts +0 -8
- package/dist/esm/stores/settings/SettingsStore.d.ts +0 -8
- package/dist/esm/stores/settings/createSettingsStore.d.ts +0 -55
- package/dist/esm/stores/settings/useSendToWalletStore.d.ts +0 -6
- package/dist/esm/stores/settings/useSendToWalletStore.js +0 -18
- package/dist/esm/stores/settings/useSendToWalletStore.js.map +0 -1
- package/dist/esm/stores/settings/useSettings.d.ts +0 -2
- package/dist/esm/stores/settings/useSettingsActions.d.ts +0 -10
- package/dist/esm/stores/settings/useSplitSubvariantStore.d.ts +0 -3
- package/dist/esm/stores/settings/useSplitSubvariantStore.js +0 -36
- package/dist/esm/stores/settings/useSplitSubvariantStore.js.map +0 -1
- package/dist/esm/stores/settings/utils/getStateValues.d.ts +0 -2
- package/dist/esm/stores/types.d.ts +0 -5
- package/dist/esm/stores/types.js +0 -2
- package/dist/esm/stores/types.js.map +0 -1
- package/dist/esm/themes/types.js +0 -2
- package/dist/esm/themes/types.js.map +0 -1
- package/dist/esm/themes/utils.d.ts +0 -4
- package/dist/esm/types/token.js +0 -2
- package/dist/esm/types/token.js.map +0 -1
- package/dist/esm/utils/chainType.d.ts +0 -2
- package/dist/esm/utils/compactNumberFormatter.test.d.ts +0 -1
- package/dist/esm/utils/compactNumberFormatter.test.js +0 -64
- package/dist/esm/utils/compactNumberFormatter.test.js.map +0 -1
- package/dist/esm/utils/converters.d.ts +0 -3
- package/dist/esm/utils/deepEqual.d.ts +0 -2
- package/dist/esm/utils/deepMerge.d.ts +0 -1
- package/dist/esm/utils/elements.d.ts +0 -11
- package/dist/esm/utils/enum.d.ts +0 -1
- package/dist/esm/utils/fees.d.ts +0 -13
- package/dist/esm/utils/format.test.d.ts +0 -1
- package/dist/esm/utils/format.test.js +0 -47
- package/dist/esm/utils/format.test.js.map +0 -1
- package/dist/esm/utils/getActionMessage.d.ts +0 -7
- package/dist/esm/utils/getErrorMessage.d.ts +0 -6
- package/dist/esm/utils/input.d.ts +0 -1
- package/dist/esm/utils/item.d.ts +0 -6
- package/dist/esm/utils/prepareActions.d.ts +0 -2
- package/dist/esm/utils/queries.d.ts +0 -1
- package/dist/esm/utils/timer.d.ts +0 -7
- package/dist/esm/utils/token.d.ts +0 -19
- package/dist/esm/utils/tokenList.d.ts +0 -10
- package/dist/esm/utils/variant.d.ts +0 -2
- package/dist/esm/utils/variant.js +0 -10
- package/dist/esm/utils/variant.js.map +0 -1
- package/dist/esm/utils/wallet.d.ts +0 -1
- package/dist/esm/utils/widgetSize.d.ts +0 -3
- package/src/components/ActiveTransactions/ActiveTransactionItem.tsx +0 -112
- package/src/components/ActiveTransactions/ActiveTransactions.style.ts +0 -28
- package/src/components/ActiveTransactions/ActiveTransactions.tsx +0 -47
- package/src/components/AmountInput/AmountInputAdornment.style.tsx +0 -69
- package/src/components/Chains/ChainSearchInput.tsx +0 -60
- package/src/components/Chains/SelectChainContent.tsx +0 -114
- package/src/components/FullPageContainer.tsx +0 -14
- package/src/components/Header/SplitNavigationTabs.tsx +0 -31
- package/src/components/Header/TransactionHistoryButton.tsx +0 -21
- package/src/components/Messages/ToAddressRequiredMessage.tsx +0 -27
- package/src/components/RouteCard/RouteCard.style.ts +0 -8
- package/src/components/RouteCard/RouteCardEssentialsExpanded.tsx +0 -57
- package/src/components/Step/CircularProgress.style.tsx +0 -100
- package/src/components/Step/CircularProgress.tsx +0 -57
- package/src/components/Step/DestinationWalletAddress.tsx +0 -66
- package/src/components/Step/Step.tsx +0 -138
- package/src/components/Step/StepAction.tsx +0 -84
- package/src/components/Step/StepList.tsx +0 -54
- package/src/components/StepActions/StepActions.style.tsx +0 -78
- package/src/components/StepActions/StepActions.tsx +0 -378
- package/src/components/StepActions/types.ts +0 -24
- package/src/components/StepDivider/StepDivider.style.tsx +0 -8
- package/src/components/StepDivider/StepDivider.tsx +0 -10
- package/src/components/Timer/StepTimer.tsx +0 -93
- package/src/components/Timer/TimerContent.tsx +0 -34
- package/src/components/TransactionDetails.tsx +0 -306
- package/src/icons/lifi.ts +0 -2
- package/src/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.tsx +0 -45
- package/src/pages/ActiveTransactionsPage/ActiveTransactionsPage.tsx +0 -96
- package/src/pages/SendToWallet/EmptyListIndicator.tsx +0 -24
- package/src/pages/TransactionHistoryPage/TransactionHistoryEmpty.tsx +0 -45
- package/src/pages/TransactionHistoryPage/TransactionHistoryItem.tsx +0 -118
- package/src/pages/TransactionHistoryPage/TransactionHistoryPage.tsx +0 -92
- package/src/pages/TransactionHistoryPage/TransactionHistorySkeleton.tsx +0 -58
- package/src/pages/TransactionHistoryPage/constants.ts +0 -1
- package/src/pages/TransactionPage/StatusBottomSheet.style.tsx +0 -74
- package/src/pages/TransactionPage/StatusBottomSheet.tsx +0 -318
- package/src/stores/routes/useExecutingRoutesIds.ts +0 -24
- package/src/stores/settings/useSendToWalletStore.ts +0 -25
- package/src/stores/settings/useSplitSubvariantStore.tsx +0 -63
- package/src/utils/variant.ts +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDebouncedWatch.js","
|
|
1
|
+
{"version":3,"file":"useDebouncedWatch.js","names":[],"sources":["../../../src/hooks/useDebouncedWatch.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport type { FormFieldArray, FormFieldNames } from '../stores/form/types.js'\nimport { useFieldValues } from '../stores/form/useFieldValues.js'\n\nexport const useDebouncedWatch = <T extends FormFieldNames[]>(\n delay: number,\n ...name: T\n): FormFieldArray<T> => {\n const watchedValue = useFieldValues(...name)\n const [debouncedValue, setDebouncedValue] = useState(watchedValue)\n const debouncedValueRef = useRef<typeof watchedValue>(null)\n const isMounted = useRef(false)\n\n useEffect(() => {\n if (isMounted.current) {\n const hasWatchedValue = watchedValue.some((value) => value)\n if (hasWatchedValue) {\n const handler = setTimeout(() => {\n setDebouncedValue(watchedValue)\n }, delay)\n return () => clearTimeout(handler)\n }\n debouncedValueRef.current = watchedValue\n setDebouncedValue(watchedValue)\n return undefined\n }\n isMounted.current = true\n return undefined\n }, [delay, watchedValue])\n\n return debouncedValue\n}\n"],"mappings":";;;AAIA,MAAa,qBACX,OACA,GAAG,SACmB;CACtB,MAAM,eAAe,eAAe,GAAG,IAAI;CAC3C,MAAM,CAAC,gBAAgB,qBAAqB,SAAS,YAAY;CACjE,MAAM,oBAAoB,OAA4B,IAAI;CAC1D,MAAM,YAAY,OAAO,KAAK;CAE9B,gBAAgB;EACd,IAAI,UAAU,SAAS;GAErB,IADwB,aAAa,MAAM,UAAU,KACnC,GAAG;IACnB,MAAM,UAAU,iBAAiB;KAC/B,kBAAkB,YAAY;IAChC,GAAG,KAAK;IACR,aAAa,aAAa,OAAO;GACnC;GACA,kBAAkB,UAAU;GAC5B,kBAAkB,YAAY;GAC9B;EACF;EACA,UAAU,UAAU;CAEtB,GAAG,CAAC,OAAO,YAAY,CAAC;CAExB,OAAO;AACT"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { useWidgetConfig } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useWidgetConfig } from "../providers/WidgetProvider/WidgetProvider.js";
|
|
2
|
+
//#region src/hooks/useDefaultElementId.ts
|
|
3
|
+
const useDefaultElementId = () => {
|
|
4
|
+
const { elementId } = useWidgetConfig();
|
|
5
|
+
return elementId;
|
|
5
6
|
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { useDefaultElementId };
|
|
9
|
+
|
|
6
10
|
//# sourceMappingURL=useDefaultElementId.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDefaultElementId.js","
|
|
1
|
+
{"version":3,"file":"useDefaultElementId.js","names":[],"sources":["../../../src/hooks/useDefaultElementId.ts"],"sourcesContent":["import { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'\n\nexport const useDefaultElementId = (): string | undefined => {\n const { elementId } = useWidgetConfig()\n return elementId\n}\n"],"mappings":";;AAEA,MAAa,4BAAgD;CAC3D,MAAM,EAAE,cAAc,gBAAgB;CACtC,OAAO;AACT"}
|
|
@@ -1,55 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { useAvailableChains } from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
? defaultTxPath
|
|
22
|
-
: explorerUrl.txPath || defaultTxPath;
|
|
23
|
-
const addressPath = typeof explorerUrl === 'string'
|
|
24
|
-
? defaultAddressPath
|
|
25
|
-
: explorerUrl.addressPath || defaultAddressPath;
|
|
26
|
-
return {
|
|
27
|
-
url: sanitiseBaseUrl(url),
|
|
28
|
-
txPath,
|
|
29
|
-
addressPath,
|
|
30
|
-
resolvedChain,
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
const getTransactionLink = ({ txHash, txLink, chain, }) => {
|
|
34
|
-
if (!txHash) {
|
|
35
|
-
return txLink;
|
|
36
|
-
}
|
|
37
|
-
const config = getExplorerConfig(chain);
|
|
38
|
-
// For EVM chains, validate the transaction hash as some relayers return custom task hashes that are not visible on-chain
|
|
39
|
-
if (config.resolvedChain?.chainType === ChainType.EVM) {
|
|
40
|
-
if (!isHex(txHash, { strict: true })) {
|
|
41
|
-
return undefined;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return `${config.url}/${config.txPath}/${txHash}`;
|
|
45
|
-
};
|
|
46
|
-
const getAddressLink = (address, chain) => {
|
|
47
|
-
const config = getExplorerConfig(chain);
|
|
48
|
-
return `${config.url}/${config.addressPath}/${address}`;
|
|
49
|
-
};
|
|
50
|
-
return {
|
|
51
|
-
getTransactionLink,
|
|
52
|
-
getAddressLink,
|
|
53
|
-
};
|
|
1
|
+
import { useWidgetConfig } from "../providers/WidgetProvider/WidgetProvider.js";
|
|
2
|
+
import "../config/constants.js";
|
|
3
|
+
import { useAvailableChains } from "./useAvailableChains.js";
|
|
4
|
+
import { ChainId, ChainType, isHex } from "@lifi/sdk";
|
|
5
|
+
import { useCallback } from "react";
|
|
6
|
+
//#region src/hooks/useExplorer.ts
|
|
7
|
+
const sanitiseBaseUrl = (baseUrl) => baseUrl.trim().replace(/\/+$/, "");
|
|
8
|
+
const explorerPathOverrides = {
|
|
9
|
+
[ChainId.SUI]: {
|
|
10
|
+
txPath: "txblock",
|
|
11
|
+
addressPath: "coin"
|
|
12
|
+
},
|
|
13
|
+
[ChainId.LTR]: {
|
|
14
|
+
txPath: "logs",
|
|
15
|
+
addressPath: "accounts"
|
|
16
|
+
},
|
|
17
|
+
[ChainType.TVM]: {
|
|
18
|
+
txPath: "#/transaction",
|
|
19
|
+
addressPath: "#/address"
|
|
20
|
+
}
|
|
54
21
|
};
|
|
22
|
+
const useExplorer = () => {
|
|
23
|
+
const { explorerUrls } = useWidgetConfig();
|
|
24
|
+
const { getChainById } = useAvailableChains();
|
|
25
|
+
const getExplorerConfig = useCallback((chain) => {
|
|
26
|
+
const resolvedChain = Number.isFinite(chain) ? getChainById(chain) : chain;
|
|
27
|
+
const explorerUrl = (resolvedChain ? explorerUrls?.[resolvedChain.id]?.[0] ?? resolvedChain.metamask.blockExplorerUrls[0] : explorerUrls?.internal?.[0]) || "https://scan.li.fi";
|
|
28
|
+
const baseUrl = typeof explorerUrl === "string" ? explorerUrl : explorerUrl.url;
|
|
29
|
+
const overrides = explorerPathOverrides[resolvedChain?.id] ?? explorerPathOverrides[resolvedChain?.chainType];
|
|
30
|
+
const defaultTxPath = overrides?.txPath ?? "tx";
|
|
31
|
+
const defaultAddressPath = overrides?.addressPath ?? "address";
|
|
32
|
+
const txPath = typeof explorerUrl === "string" ? defaultTxPath : explorerUrl.txPath || defaultTxPath;
|
|
33
|
+
const addressPath = typeof explorerUrl === "string" ? defaultAddressPath : explorerUrl.addressPath || defaultAddressPath;
|
|
34
|
+
return {
|
|
35
|
+
url: sanitiseBaseUrl(baseUrl),
|
|
36
|
+
txPath,
|
|
37
|
+
addressPath,
|
|
38
|
+
resolvedChain,
|
|
39
|
+
hasOverride: Boolean(overrides)
|
|
40
|
+
};
|
|
41
|
+
}, [explorerUrls, getChainById]);
|
|
42
|
+
return {
|
|
43
|
+
getTransactionLink: useCallback(({ txHash, txLink, chain }) => {
|
|
44
|
+
if (txHash) {
|
|
45
|
+
const config = getExplorerConfig(chain);
|
|
46
|
+
if (config.resolvedChain?.chainType !== ChainType.EVM || config.hasOverride || isHex(txHash, { strict: true })) return `${config.url}/${config.txPath}/${txHash}`;
|
|
47
|
+
}
|
|
48
|
+
return txLink;
|
|
49
|
+
}, [getExplorerConfig]),
|
|
50
|
+
getAddressLink: useCallback((address, chain) => {
|
|
51
|
+
const config = getExplorerConfig(chain);
|
|
52
|
+
return `${config.url}/${config.addressPath}/${address}`;
|
|
53
|
+
}, [getExplorerConfig])
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { useExplorer };
|
|
58
|
+
|
|
55
59
|
//# sourceMappingURL=useExplorer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExplorer.js","
|
|
1
|
+
{"version":3,"file":"useExplorer.js","names":[],"sources":["../../../src/hooks/useExplorer.ts"],"sourcesContent":["import type { Chain } from '@lifi/sdk'\nimport { ChainId, ChainType, isHex } from '@lifi/sdk'\nimport { useCallback } from 'react'\nimport { internalExplorerUrl } from '../config/constants.js'\nimport { useAvailableChains } from '../hooks/useAvailableChains.js'\nimport { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'\n\nconst sanitiseBaseUrl = (baseUrl: string) => baseUrl.trim().replace(/\\/+$/, '')\n\nconst explorerPathOverrides: Partial<\n Record<ChainType | ChainId, { txPath: string; addressPath: string }>\n> = {\n [ChainId.SUI]: { txPath: 'txblock', addressPath: 'coin' },\n [ChainId.LTR]: { txPath: 'logs', addressPath: 'accounts' },\n [ChainType.TVM]: { txPath: '#/transaction', addressPath: '#/address' },\n}\n\ntype TransactionLinkProps = {\n chain?: Chain | number\n txHash?: string\n txLink?: string\n}\n\nexport const useExplorer = (): {\n getTransactionLink: (props: TransactionLinkProps) => string | undefined\n getAddressLink: (address: string, chain?: Chain | number) => string\n} => {\n const { explorerUrls } = useWidgetConfig()\n const { getChainById } = useAvailableChains()\n\n const getExplorerConfig = useCallback(\n (chain?: Chain | number) => {\n const resolvedChain = Number.isFinite(chain)\n ? getChainById(chain as number)\n : (chain as Chain)\n\n const explorerUrl =\n (resolvedChain\n ? (explorerUrls?.[resolvedChain.id]?.[0] ??\n resolvedChain.metamask.blockExplorerUrls[0])\n : explorerUrls?.internal?.[0]) || internalExplorerUrl\n\n const baseUrl =\n typeof explorerUrl === 'string' ? explorerUrl : explorerUrl.url\n\n const overrides =\n explorerPathOverrides[resolvedChain?.id as ChainId] ??\n explorerPathOverrides[resolvedChain?.chainType as ChainType]\n\n const defaultTxPath = overrides?.txPath ?? 'tx'\n const defaultAddressPath = overrides?.addressPath ?? 'address'\n const txPath =\n typeof explorerUrl === 'string'\n ? defaultTxPath\n : explorerUrl.txPath || defaultTxPath\n const addressPath =\n typeof explorerUrl === 'string'\n ? defaultAddressPath\n : explorerUrl.addressPath || defaultAddressPath\n\n return {\n url: sanitiseBaseUrl(baseUrl),\n txPath,\n addressPath,\n resolvedChain,\n hasOverride: Boolean(overrides),\n }\n },\n [explorerUrls, getChainById]\n )\n\n const getTransactionLink = useCallback(\n ({ txHash, txLink, chain }: TransactionLinkProps): string | undefined => {\n if (txHash) {\n const config = getExplorerConfig(chain)\n // For EVM chains, sanity-check the transaction hash as some relayers return custom task hashes that are not visible on-chain.\n // Skip the check when a chain-specific path override is registered — that's an explicit signal the chain's\n // explorer accepts a non-hex hash (e.g. Lighter, whose hash has no 0x prefix).\n const validForEvm =\n config.resolvedChain?.chainType !== ChainType.EVM ||\n config.hasOverride ||\n isHex(txHash, { strict: true })\n if (validForEvm) {\n return `${config.url}/${config.txPath}/${txHash}`\n }\n }\n return txLink\n },\n [getExplorerConfig]\n )\n\n const getAddressLink = useCallback(\n (address: string, chain?: Chain | number) => {\n const config = getExplorerConfig(chain)\n return `${config.url}/${config.addressPath}/${address}`\n },\n [getExplorerConfig]\n )\n\n return {\n getTransactionLink,\n getAddressLink,\n }\n}\n"],"mappings":";;;;;;AAOA,MAAM,mBAAmB,YAAoB,QAAQ,KAAK,CAAC,CAAC,QAAQ,QAAQ,EAAE;AAE9E,MAAM,wBAEF;EACD,QAAQ,MAAM;EAAE,QAAQ;EAAW,aAAa;CAAO;EACvD,QAAQ,MAAM;EAAE,QAAQ;EAAQ,aAAa;CAAW;EACxD,UAAU,MAAM;EAAE,QAAQ;EAAiB,aAAa;CAAY;AACvE;AAQA,MAAa,oBAGR;CACH,MAAM,EAAE,iBAAiB,gBAAgB;CACzC,MAAM,EAAE,iBAAiB,mBAAmB;CAE5C,MAAM,oBAAoB,aACvB,UAA2B;EAC1B,MAAM,gBAAgB,OAAO,SAAS,KAAK,IACvC,aAAa,KAAe,IAC3B;EAEL,MAAM,eACH,gBACI,eAAe,cAAc,GAAG,GAAG,MACpC,cAAc,SAAS,kBAAkB,KACzC,cAAc,WAAW,OAAA;EAE/B,MAAM,UACJ,OAAO,gBAAgB,WAAW,cAAc,YAAY;EAE9D,MAAM,YACJ,sBAAsB,eAAe,OACrC,sBAAsB,eAAe;EAEvC,MAAM,gBAAgB,WAAW,UAAU;EAC3C,MAAM,qBAAqB,WAAW,eAAe;EACrD,MAAM,SACJ,OAAO,gBAAgB,WACnB,gBACA,YAAY,UAAU;EAC5B,MAAM,cACJ,OAAO,gBAAgB,WACnB,qBACA,YAAY,eAAe;EAEjC,OAAO;GACL,KAAK,gBAAgB,OAAO;GAC5B;GACA;GACA;GACA,aAAa,QAAQ,SAAS;EAChC;CACF,GACA,CAAC,cAAc,YAAY,CAC7B;CA8BA,OAAO;EACL,oBA7ByB,aACxB,EAAE,QAAQ,QAAQ,YAAsD;GACvE,IAAI,QAAQ;IACV,MAAM,SAAS,kBAAkB,KAAK;IAQtC,IAHE,OAAO,eAAe,cAAc,UAAU,OAC9C,OAAO,eACP,MAAM,QAAQ,EAAE,QAAQ,KAAK,CAAC,GAE9B,OAAO,GAAG,OAAO,IAAI,GAAG,OAAO,OAAO,GAAG;GAE7C;GACA,OAAO;EACT,GACA,CAAC,iBAAiB,CAYD;EACjB,gBAVqB,aACpB,SAAiB,UAA2B;GAC3C,MAAM,SAAS,kBAAkB,KAAK;GACtC,OAAO,GAAG,OAAO,IAAI,GAAG,OAAO,YAAY,GAAG;EAChD,GACA,CAAC,iBAAiB,CAKL;CACf;AACF"}
|
|
@@ -1,87 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
})
|
|
68
|
-
// Mark tokens from wallet balances as unverified
|
|
69
|
-
.map((token) => ({
|
|
70
|
-
...token,
|
|
71
|
-
verified: false,
|
|
72
|
-
}));
|
|
73
|
-
// Combine both sets of tokens - convert WalletTokenExtended to TokenAmount
|
|
74
|
-
const allTokens = [
|
|
75
|
-
...filteredTokens,
|
|
76
|
-
...additionalTokens,
|
|
77
|
-
];
|
|
78
|
-
if (allTokens.length) {
|
|
79
|
-
result[address][chainId] = allTokens;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return result;
|
|
84
|
-
}, [accountsWithTokens, existingBalances, configTokens, formType]);
|
|
85
|
-
return { data: accountsWithFilteredTokens, isLoading };
|
|
1
|
+
import { getConfigItemSets, isFormItemAllowed } from "../utils/item.js";
|
|
2
|
+
import { useWidgetConfig } from "../providers/WidgetProvider/WidgetProvider.js";
|
|
3
|
+
import { useSDKClient } from "../providers/SDKClientProvider.js";
|
|
4
|
+
import { isSupportedToken } from "../utils/tokenList.js";
|
|
5
|
+
import { ChainType, getWalletBalances } from "@lifi/sdk";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { useQuery } from "@tanstack/react-query";
|
|
8
|
+
//#region src/hooks/useFilteredByTokenBalances.ts
|
|
9
|
+
const useFilteredTokensByBalance = (accountsWithTokens, formType) => {
|
|
10
|
+
const { tokens: configTokens } = useWidgetConfig();
|
|
11
|
+
const sdkClient = useSDKClient();
|
|
12
|
+
const evmAddress = useMemo(() => {
|
|
13
|
+
return Object.entries(accountsWithTokens ?? {}).find(([_, { chainType }]) => chainType === ChainType.EVM)?.[0];
|
|
14
|
+
}, [accountsWithTokens]);
|
|
15
|
+
const { data: existingBalances, isLoading } = useQuery({
|
|
16
|
+
queryKey: ["existing-evm-balances", evmAddress],
|
|
17
|
+
queryFn: () => getWalletBalances(sdkClient, evmAddress ?? ""),
|
|
18
|
+
enabled: !!evmAddress,
|
|
19
|
+
refetchInterval: 3e4,
|
|
20
|
+
staleTime: 3e4,
|
|
21
|
+
retry: false
|
|
22
|
+
});
|
|
23
|
+
return {
|
|
24
|
+
data: useMemo(() => {
|
|
25
|
+
if (!accountsWithTokens) return;
|
|
26
|
+
const result = {};
|
|
27
|
+
if (!existingBalances) {
|
|
28
|
+
for (const [address, { tokens }] of Object.entries(accountsWithTokens)) result[address] = tokens;
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
for (const [address, { tokens }] of Object.entries(accountsWithTokens)) {
|
|
32
|
+
result[address] = {};
|
|
33
|
+
for (const [chainIdStr, chainTokens] of Object.entries(tokens)) {
|
|
34
|
+
const chainId = Number(chainIdStr);
|
|
35
|
+
const balances = existingBalances?.[chainId];
|
|
36
|
+
if (!balances?.length) {
|
|
37
|
+
if (chainTokens.length) result[address][chainId] = chainTokens;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const balanceSet = new Set(balances.map((balance) => balance.address.toLowerCase()));
|
|
41
|
+
const filteredTokens = chainTokens.filter((token) => {
|
|
42
|
+
const tokenKey = token.address.toLowerCase();
|
|
43
|
+
return balanceSet.has(tokenKey);
|
|
44
|
+
});
|
|
45
|
+
const chainTokenSet = new Set(chainTokens.map((token) => token.address.toLowerCase()));
|
|
46
|
+
const allowedAddressesConfig = getConfigItemSets(configTokens, (tokens) => new Set(tokens.filter((t) => Number(t.chainId) === chainId).map((t) => t.address.toLowerCase())), formType);
|
|
47
|
+
const additionalTokens = balances.filter((balance) => {
|
|
48
|
+
const balanceKey = balance.address.toLowerCase();
|
|
49
|
+
return !chainTokenSet.has(balanceKey) && isSupportedToken(balance) && isFormItemAllowed(balance, allowedAddressesConfig, formType, (t) => t.address.toLowerCase());
|
|
50
|
+
}).map((token) => ({
|
|
51
|
+
...token,
|
|
52
|
+
verified: false
|
|
53
|
+
}));
|
|
54
|
+
const allTokens = [...filteredTokens, ...additionalTokens];
|
|
55
|
+
if (allTokens.length) result[address][chainId] = allTokens;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
59
|
+
}, [
|
|
60
|
+
accountsWithTokens,
|
|
61
|
+
existingBalances,
|
|
62
|
+
configTokens,
|
|
63
|
+
formType
|
|
64
|
+
]),
|
|
65
|
+
isLoading
|
|
66
|
+
};
|
|
86
67
|
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { useFilteredTokensByBalance };
|
|
70
|
+
|
|
87
71
|
//# sourceMappingURL=useFilteredByTokenBalances.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFilteredByTokenBalances.js","
|
|
1
|
+
{"version":3,"file":"useFilteredByTokenBalances.js","names":[],"sources":["../../../src/hooks/useFilteredByTokenBalances.ts"],"sourcesContent":["import {\n type BaseToken,\n ChainType,\n getWalletBalances,\n type TokenExtended,\n type WalletTokenExtended,\n} from '@lifi/sdk'\nimport { useQuery } from '@tanstack/react-query'\nimport { useMemo } from 'react'\nimport { useSDKClient } from '../providers/SDKClientProvider.js'\nimport { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'\nimport type { FormType } from '../stores/form/types.js'\nimport { getConfigItemSets, isFormItemAllowed } from '../utils/item.js'\nimport { isSupportedToken } from '../utils/tokenList.js'\n\nexport const useFilteredTokensByBalance = (\n accountsWithTokens?: Record<\n string,\n { chainType: ChainType; tokens: Record<number, TokenExtended[]> }\n >,\n formType?: FormType\n): {\n data: Record<string, Record<number, TokenExtended[]>> | undefined\n isLoading: boolean\n} => {\n const { tokens: configTokens } = useWidgetConfig()\n const sdkClient = useSDKClient()\n\n const evmAddress = useMemo(() => {\n const evmAccount = Object.entries(accountsWithTokens ?? {}).find(\n ([_, { chainType }]) => chainType === ChainType.EVM\n )\n return evmAccount?.[0]\n }, [accountsWithTokens])\n\n const { data: existingBalances, isLoading } = useQuery({\n queryKey: ['existing-evm-balances', evmAddress],\n queryFn: () => getWalletBalances(sdkClient, evmAddress ?? ''),\n enabled: !!evmAddress,\n refetchInterval: 30_000, // 30 seconds\n staleTime: 30_000, // 30 seconds\n retry: false,\n })\n\n const accountsWithFilteredTokens = useMemo(() => {\n if (!accountsWithTokens) {\n return undefined\n }\n\n // Early return if no existing balances - return all tokens\n const result: Record<string, Record<number, TokenExtended[]>> = {}\n if (!existingBalances) {\n for (const [address, { tokens }] of Object.entries(accountsWithTokens)) {\n result[address] = tokens\n }\n return result\n }\n\n for (const [address, { tokens }] of Object.entries(accountsWithTokens)) {\n result[address] = {}\n\n for (const [chainIdStr, chainTokens] of Object.entries(tokens)) {\n const chainId = Number(chainIdStr)\n // Get balances for this specific chain\n const balances = existingBalances?.[chainId]\n // If no balances, RPC all tokens of the chain\n if (!balances?.length) {\n if (chainTokens.length) {\n result[address][chainId] = chainTokens\n }\n continue\n }\n\n // Optimize token matching with Set for O(1) lookup\n const balanceSet = new Set(\n balances.map((balance: WalletTokenExtended) =>\n balance.address.toLowerCase()\n )\n )\n\n // Get tokens that are in chainTokens and have balances\n const filteredTokens = chainTokens.filter((token) => {\n const tokenKey = token.address.toLowerCase()\n return balanceSet.has(tokenKey)\n })\n\n // Get tokens that are in balances but not in chainTokens\n const chainTokenSet = new Set(\n chainTokens.map((token) => token.address.toLowerCase())\n )\n\n // Get allowed addresses from config tokens\n const allowedAddressesConfig = getConfigItemSets(\n configTokens,\n (tokens: BaseToken[]) =>\n new Set(\n tokens\n .filter((t) => Number(t.chainId) === chainId)\n .map((t) => t.address.toLowerCase())\n ),\n formType\n )\n\n const additionalTokens = balances\n .filter((balance: WalletTokenExtended) => {\n const balanceKey = balance.address.toLowerCase()\n return (\n !chainTokenSet.has(balanceKey) &&\n isSupportedToken(balance) &&\n isFormItemAllowed(\n balance,\n allowedAddressesConfig,\n formType,\n (t) => t.address.toLowerCase()\n )\n )\n })\n // Mark tokens from wallet balances as unverified\n .map((token: WalletTokenExtended) => ({\n ...token,\n verified: false,\n })) as TokenExtended[]\n\n // Combine both sets of tokens - convert WalletTokenExtended to TokenAmount\n const allTokens = [\n ...filteredTokens,\n ...additionalTokens,\n ] as TokenExtended[]\n\n if (allTokens.length) {\n result[address][chainId] = allTokens\n }\n }\n }\n\n return result\n }, [accountsWithTokens, existingBalances, configTokens, formType])\n\n return { data: accountsWithFilteredTokens, isLoading }\n}\n"],"mappings":";;;;;;;;AAeA,MAAa,8BACX,oBAIA,aAIG;CACH,MAAM,EAAE,QAAQ,iBAAiB,gBAAgB;CACjD,MAAM,YAAY,aAAa;CAE/B,MAAM,aAAa,cAAc;EAI/B,OAHmB,OAAO,QAAQ,sBAAsB,CAAC,CAAC,CAAC,CAAC,MACzD,CAAC,GAAG,EAAE,iBAAiB,cAAc,UAAU,GAElC,CAAC,GAAG;CACtB,GAAG,CAAC,kBAAkB,CAAC;CAEvB,MAAM,EAAE,MAAM,kBAAkB,cAAc,SAAS;EACrD,UAAU,CAAC,yBAAyB,UAAU;EAC9C,eAAe,kBAAkB,WAAW,cAAc,EAAE;EAC5D,SAAS,CAAC,CAAC;EACX,iBAAiB;EACjB,WAAW;EACX,OAAO;CACT,CAAC;CAgGD,OAAO;EAAE,MA9F0B,cAAc;GAC/C,IAAI,CAAC,oBACH;GAIF,MAAM,SAA0D,CAAC;GACjE,IAAI,CAAC,kBAAkB;IACrB,KAAK,MAAM,CAAC,SAAS,EAAE,aAAa,OAAO,QAAQ,kBAAkB,GACnE,OAAO,WAAW;IAEpB,OAAO;GACT;GAEA,KAAK,MAAM,CAAC,SAAS,EAAE,aAAa,OAAO,QAAQ,kBAAkB,GAAG;IACtE,OAAO,WAAW,CAAC;IAEnB,KAAK,MAAM,CAAC,YAAY,gBAAgB,OAAO,QAAQ,MAAM,GAAG;KAC9D,MAAM,UAAU,OAAO,UAAU;KAEjC,MAAM,WAAW,mBAAmB;KAEpC,IAAI,CAAC,UAAU,QAAQ;MACrB,IAAI,YAAY,QACd,OAAO,QAAQ,CAAC,WAAW;MAE7B;KACF;KAGA,MAAM,aAAa,IAAI,IACrB,SAAS,KAAK,YACZ,QAAQ,QAAQ,YAAY,CAC9B,CACF;KAGA,MAAM,iBAAiB,YAAY,QAAQ,UAAU;MACnD,MAAM,WAAW,MAAM,QAAQ,YAAY;MAC3C,OAAO,WAAW,IAAI,QAAQ;KAChC,CAAC;KAGD,MAAM,gBAAgB,IAAI,IACxB,YAAY,KAAK,UAAU,MAAM,QAAQ,YAAY,CAAC,CACxD;KAGA,MAAM,yBAAyB,kBAC7B,eACC,WACC,IAAI,IACF,OACG,QAAQ,MAAM,OAAO,EAAE,OAAO,MAAM,OAAO,CAAC,CAC5C,KAAK,MAAM,EAAE,QAAQ,YAAY,CAAC,CACvC,GACF,QACF;KAEA,MAAM,mBAAmB,SACtB,QAAQ,YAAiC;MACxC,MAAM,aAAa,QAAQ,QAAQ,YAAY;MAC/C,OACE,CAAC,cAAc,IAAI,UAAU,KAC7B,iBAAiB,OAAO,KACxB,kBACE,SACA,wBACA,WACC,MAAM,EAAE,QAAQ,YAAY,CAC/B;KAEJ,CAAC,CAAC,CAED,KAAK,WAAgC;MACpC,GAAG;MACH,UAAU;KACZ,EAAE;KAGJ,MAAM,YAAY,CAChB,GAAG,gBACH,GAAG,gBACL;KAEA,IAAI,UAAU,QACZ,OAAO,QAAQ,CAAC,WAAW;IAE/B;GACF;GAEA,OAAO;EACT,GAAG;GAAC;GAAoB;GAAkB;GAAc;EAAQ,CAExB;EAAG;CAAU;AACvD"}
|
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FormKeyHelper } from
|
|
4
|
-
import { useFieldValues } from
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { useWidgetConfig } from "../providers/WidgetProvider/WidgetProvider.js";
|
|
2
|
+
import { formatTokenPrice } from "../utils/format.js";
|
|
3
|
+
import { FormKeyHelper } from "../stores/form/types.js";
|
|
4
|
+
import { useFieldValues } from "../stores/form/useFieldValues.js";
|
|
5
|
+
import { useToken } from "./useToken.js";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
//#region src/hooks/useFromAmountThreshold.ts
|
|
8
|
+
const useFromAmountThreshold = () => {
|
|
9
|
+
const { minFromAmountUSD } = useWidgetConfig();
|
|
10
|
+
const [chainId, tokenAddress, fromAmount] = useFieldValues(FormKeyHelper.getChainKey("from"), FormKeyHelper.getTokenKey("from"), FormKeyHelper.getAmountKey("from"));
|
|
11
|
+
const { token } = useToken(chainId, tokenAddress);
|
|
12
|
+
return {
|
|
13
|
+
belowMinFromAmountUSD: useMemo(() => {
|
|
14
|
+
const fromAmountUSD = formatTokenPrice(fromAmount, token?.priceUSD, token?.decimals);
|
|
15
|
+
if (!minFromAmountUSD || !fromAmountUSD) return false;
|
|
16
|
+
return fromAmountUSD < minFromAmountUSD;
|
|
17
|
+
}, [
|
|
18
|
+
minFromAmountUSD,
|
|
19
|
+
fromAmount,
|
|
20
|
+
token?.priceUSD,
|
|
21
|
+
token?.decimals
|
|
22
|
+
]),
|
|
23
|
+
minFromAmountUSD
|
|
24
|
+
};
|
|
22
25
|
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { useFromAmountThreshold };
|
|
28
|
+
|
|
23
29
|
//# sourceMappingURL=useFromAmountThreshold.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFromAmountThreshold.js","
|
|
1
|
+
{"version":3,"file":"useFromAmountThreshold.js","names":[],"sources":["../../../src/hooks/useFromAmountThreshold.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'\nimport { FormKeyHelper } from '../stores/form/types.js'\nimport { useFieldValues } from '../stores/form/useFieldValues.js'\nimport { formatTokenPrice } from '../utils/format.js'\nimport { useToken } from './useToken.js'\n\nexport const useFromAmountThreshold = (): {\n belowMinFromAmountUSD: boolean\n minFromAmountUSD: number | undefined\n} => {\n const { minFromAmountUSD } = useWidgetConfig()\n\n const [chainId, tokenAddress, fromAmount] = useFieldValues(\n FormKeyHelper.getChainKey('from'),\n FormKeyHelper.getTokenKey('from'),\n FormKeyHelper.getAmountKey('from')\n )\n const { token } = useToken(chainId, tokenAddress)\n\n const belowMinFromAmountUSD = useMemo(() => {\n const fromAmountUSD = formatTokenPrice(\n fromAmount,\n token?.priceUSD,\n token?.decimals\n )\n\n if (!minFromAmountUSD || !fromAmountUSD) {\n return false\n }\n return fromAmountUSD < minFromAmountUSD\n }, [minFromAmountUSD, fromAmount, token?.priceUSD, token?.decimals])\n\n return {\n belowMinFromAmountUSD,\n minFromAmountUSD,\n }\n}\n"],"mappings":";;;;;;;AAOA,MAAa,+BAGR;CACH,MAAM,EAAE,qBAAqB,gBAAgB;CAE7C,MAAM,CAAC,SAAS,cAAc,cAAc,eAC1C,cAAc,YAAY,MAAM,GAChC,cAAc,YAAY,MAAM,GAChC,cAAc,aAAa,MAAM,CACnC;CACA,MAAM,EAAE,UAAU,SAAS,SAAS,YAAY;CAehD,OAAO;EACL,uBAd4B,cAAc;GAC1C,MAAM,gBAAgB,iBACpB,YACA,OAAO,UACP,OAAO,QACT;GAEA,IAAI,CAAC,oBAAoB,CAAC,eACxB,OAAO;GAET,OAAO,gBAAgB;EACzB,GAAG;GAAC;GAAkB;GAAY,OAAO;GAAU,OAAO;EAAQ,CAG5C;EACpB;CACF;AACF"}
|
|
@@ -1,64 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return insufficientFunds;
|
|
53
|
-
},
|
|
54
|
-
enabled: Boolean(account.address && token && !isTokenAddressBalanceLoading),
|
|
55
|
-
refetchInterval,
|
|
56
|
-
staleTime: refetchInterval,
|
|
57
|
-
placeholderData: account.address ? keepPreviousData : undefined,
|
|
58
|
-
});
|
|
59
|
-
return {
|
|
60
|
-
insufficientFromToken,
|
|
61
|
-
isLoading,
|
|
62
|
-
};
|
|
1
|
+
import { useWidgetConfig } from "../providers/WidgetProvider/WidgetProvider.js";
|
|
2
|
+
import { useSDKClient } from "../providers/SDKClientProvider.js";
|
|
3
|
+
import { getQueryKey } from "../utils/queries.js";
|
|
4
|
+
import { useFieldValues } from "../stores/form/useFieldValues.js";
|
|
5
|
+
import { isRouteDone } from "../stores/routes/utils.js";
|
|
6
|
+
import { getTokenBalancesWithRetry } from "./useTokenBalance.js";
|
|
7
|
+
import { useTokenAddressBalance } from "./useTokenAddressBalance.js";
|
|
8
|
+
import { parseUnits } from "@lifi/sdk";
|
|
9
|
+
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
|
10
|
+
import { useAccount } from "@lifi/wallet-management";
|
|
11
|
+
//#region src/hooks/useFromTokenSufficiency.ts
|
|
12
|
+
const refetchInterval = 3e4;
|
|
13
|
+
const useFromTokenSufficiency = (route) => {
|
|
14
|
+
const [fromChainId, fromTokenAddress, fromAmount] = useFieldValues("fromChain", "fromToken", "fromAmount");
|
|
15
|
+
const { keyPrefix } = useWidgetConfig();
|
|
16
|
+
const sdkClient = useSDKClient();
|
|
17
|
+
let chainId = fromChainId;
|
|
18
|
+
let tokenAddress = fromTokenAddress;
|
|
19
|
+
if (route) {
|
|
20
|
+
chainId = route.fromToken.chainId;
|
|
21
|
+
tokenAddress = route.fromToken.address;
|
|
22
|
+
}
|
|
23
|
+
const { token, chain, isLoading: isTokenAddressBalanceLoading } = useTokenAddressBalance(chainId, tokenAddress);
|
|
24
|
+
const { account } = useAccount({ chainType: chain?.chainType });
|
|
25
|
+
const { data: insufficientFromToken, isLoading } = useQuery({
|
|
26
|
+
queryKey: [
|
|
27
|
+
getQueryKey("from-token-sufficiency-check", keyPrefix),
|
|
28
|
+
account.address,
|
|
29
|
+
chainId,
|
|
30
|
+
tokenAddress,
|
|
31
|
+
route?.id ?? fromAmount
|
|
32
|
+
],
|
|
33
|
+
queryFn: async ({ queryKey: [, accountAddress] }) => {
|
|
34
|
+
if (!accountAddress || !token) return;
|
|
35
|
+
const parsedFromAmount = parseUnits(fromAmount, token.decimals);
|
|
36
|
+
let currentTokenBalance = token.amount ?? 0n;
|
|
37
|
+
if (!route || isRouteDone(route)) return currentTokenBalance < parsedFromAmount;
|
|
38
|
+
const currentAction = route.steps.filter((step) => step.execution?.status !== "DONE")[0]?.action;
|
|
39
|
+
if (token.chainId === currentAction.fromToken.chainId && token.address === currentAction.fromToken.address && currentTokenBalance > 0) return BigInt(route.fromAmount) > currentTokenBalance;
|
|
40
|
+
currentTokenBalance = (await getTokenBalancesWithRetry(sdkClient, accountAddress, [currentAction.fromToken]))?.[0]?.amount ?? 0n;
|
|
41
|
+
return BigInt(currentAction.fromAmount) > currentTokenBalance;
|
|
42
|
+
},
|
|
43
|
+
enabled: Boolean(account.address && token && !isTokenAddressBalanceLoading),
|
|
44
|
+
refetchInterval,
|
|
45
|
+
staleTime: refetchInterval,
|
|
46
|
+
placeholderData: account.address ? keepPreviousData : void 0
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
insufficientFromToken,
|
|
50
|
+
isLoading
|
|
51
|
+
};
|
|
63
52
|
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { useFromTokenSufficiency };
|
|
55
|
+
|
|
64
56
|
//# sourceMappingURL=useFromTokenSufficiency.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFromTokenSufficiency.js","
|
|
1
|
+
{"version":3,"file":"useFromTokenSufficiency.js","names":[],"sources":["../../../src/hooks/useFromTokenSufficiency.ts"],"sourcesContent":["import { parseUnits, type RouteExtended } from '@lifi/sdk'\nimport { useAccount } from '@lifi/wallet-management'\nimport { keepPreviousData, useQuery } from '@tanstack/react-query'\nimport { useSDKClient } from '../providers/SDKClientProvider.js'\nimport { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'\nimport { useFieldValues } from '../stores/form/useFieldValues.js'\nimport { isRouteDone } from '../stores/routes/utils.js'\nimport { getQueryKey } from '../utils/queries.js'\nimport { useTokenAddressBalance } from './useTokenAddressBalance.js'\nimport { getTokenBalancesWithRetry } from './useTokenBalance.js'\n\nconst refetchInterval = 30_000\n\nexport const useFromTokenSufficiency = (\n route?: RouteExtended\n): {\n insufficientFromToken: boolean | undefined\n isLoading: boolean\n} => {\n const [fromChainId, fromTokenAddress, fromAmount] = useFieldValues(\n 'fromChain',\n 'fromToken',\n 'fromAmount'\n )\n const { keyPrefix } = useWidgetConfig()\n const sdkClient = useSDKClient()\n\n let chainId = fromChainId\n let tokenAddress = fromTokenAddress\n if (route) {\n chainId = route.fromToken.chainId\n tokenAddress = route.fromToken.address\n }\n\n const {\n token,\n chain,\n isLoading: isTokenAddressBalanceLoading,\n } = useTokenAddressBalance(chainId, tokenAddress)\n\n const { account } = useAccount({ chainType: chain?.chainType })\n\n const { data: insufficientFromToken, isLoading } = useQuery({\n queryKey: [\n getQueryKey('from-token-sufficiency-check', keyPrefix),\n account.address,\n chainId,\n tokenAddress,\n route?.id ?? fromAmount,\n ] as const,\n queryFn: async ({ queryKey: [, accountAddress] }) => {\n if (!accountAddress || !token) {\n return\n }\n const parsedFromAmount = parseUnits(fromAmount, token.decimals)\n let currentTokenBalance = token.amount ?? 0n\n\n if (!route || isRouteDone(route)) {\n const insufficientFunds = currentTokenBalance < parsedFromAmount\n return insufficientFunds\n }\n\n const currentAction = route.steps.filter(\n (step) => step.execution?.status !== 'DONE'\n )[0]?.action\n\n if (\n token.chainId === currentAction.fromToken.chainId &&\n token.address === currentAction.fromToken.address &&\n currentTokenBalance > 0\n ) {\n const insufficientFunds = BigInt(route.fromAmount) > currentTokenBalance\n return insufficientFunds\n }\n\n const tokenBalances = await getTokenBalancesWithRetry(\n sdkClient,\n accountAddress,\n [currentAction.fromToken]\n )\n\n currentTokenBalance = tokenBalances?.[0]?.amount ?? 0n\n const insufficientFunds =\n BigInt(currentAction.fromAmount) > currentTokenBalance\n return insufficientFunds\n },\n\n enabled: Boolean(account.address && token && !isTokenAddressBalanceLoading),\n refetchInterval,\n staleTime: refetchInterval,\n placeholderData: account.address ? keepPreviousData : undefined,\n })\n\n return {\n insufficientFromToken,\n isLoading,\n }\n}\n"],"mappings":";;;;;;;;;;;AAWA,MAAM,kBAAkB;AAExB,MAAa,2BACX,UAIG;CACH,MAAM,CAAC,aAAa,kBAAkB,cAAc,eAClD,aACA,aACA,YACF;CACA,MAAM,EAAE,cAAc,gBAAgB;CACtC,MAAM,YAAY,aAAa;CAE/B,IAAI,UAAU;CACd,IAAI,eAAe;CACnB,IAAI,OAAO;EACT,UAAU,MAAM,UAAU;EAC1B,eAAe,MAAM,UAAU;CACjC;CAEA,MAAM,EACJ,OACA,OACA,WAAW,iCACT,uBAAuB,SAAS,YAAY;CAEhD,MAAM,EAAE,YAAY,WAAW,EAAE,WAAW,OAAO,UAAU,CAAC;CAE9D,MAAM,EAAE,MAAM,uBAAuB,cAAc,SAAS;EAC1D,UAAU;GACR,YAAY,gCAAgC,SAAS;GACrD,QAAQ;GACR;GACA;GACA,OAAO,MAAM;EACf;EACA,SAAS,OAAO,EAAE,UAAU,GAAG,sBAAsB;GACnD,IAAI,CAAC,kBAAkB,CAAC,OACtB;GAEF,MAAM,mBAAmB,WAAW,YAAY,MAAM,QAAQ;GAC9D,IAAI,sBAAsB,MAAM,UAAU;GAE1C,IAAI,CAAC,SAAS,YAAY,KAAK,GAE7B,OAD0B,sBAAsB;GAIlD,MAAM,gBAAgB,MAAM,MAAM,QAC/B,SAAS,KAAK,WAAW,WAAW,MACvC,CAAC,CAAC,EAAE,EAAE;GAEN,IACE,MAAM,YAAY,cAAc,UAAU,WAC1C,MAAM,YAAY,cAAc,UAAU,WAC1C,sBAAsB,GAGtB,OAD0B,OAAO,MAAM,UAAU,IAAI;GAUvD,uBAAsB,MANM,0BAC1B,WACA,gBACA,CAAC,cAAc,SAAS,CAC1B,EAAA,GAEsC,EAAE,EAAE,UAAU;GAGpD,OADE,OAAO,cAAc,UAAU,IAAI;EAEvC;EAEA,SAAS,QAAQ,QAAQ,WAAW,SAAS,CAAC,4BAA4B;EAC1E;EACA,WAAW;EACX,iBAAiB,QAAQ,UAAU,mBAAmB,KAAA;CACxD,CAAC;CAED,OAAO;EACL;EACA;CACF;AACF"}
|