@lifi/widget 2.9.3 → 3.0.0-alpha.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/AppProvider.js +2 -2
- package/AppRoutes.js +75 -67
- package/cjs/AppProvider.js +1 -1
- package/cjs/AppRoutes.js +74 -66
- package/cjs/components/ActiveTransactions/ActiveTransactionItem.js +1 -5
- package/cjs/components/ActiveTransactions/ActiveTransactions.js +2 -2
- package/cjs/components/AmountInput/AmountInputEndAdornment.js +9 -10
- package/cjs/components/AmountInput/FormPriceHelperText.js +1 -1
- package/cjs/components/BaseTransactionButton/BaseTransactionButton.js +5 -4
- package/cjs/components/Card/CardLabel.d.ts +1 -1
- package/cjs/components/ChainSelect/ChainSelect.js +8 -5
- package/cjs/components/ChainSelect/useChainSelect.js +21 -2
- package/cjs/components/GasMessage/GasMessage.style.js +3 -6
- package/cjs/components/GasMessage/GasSufficiencyMessage.js +2 -1
- package/cjs/components/Header/Header.style.d.ts +8 -0
- package/cjs/components/Header/Header.style.js +16 -1
- package/cjs/components/Header/NavigationHeader.d.ts +1 -0
- package/cjs/components/Header/NavigationHeader.js +15 -8
- package/cjs/components/Header/NavigationTabs.js +2 -2
- package/cjs/components/Header/SettingsButton.d.ts +1 -0
- package/cjs/components/Header/SettingsButton.js +25 -0
- package/cjs/components/Header/SettingsButton.style.d.ts +11 -0
- package/cjs/components/Header/SettingsButton.style.js +43 -0
- package/cjs/components/Header/WalletHeader.js +11 -24
- package/cjs/components/Header/WalletMenu.d.ts +3 -1
- package/cjs/components/Header/WalletMenu.js +58 -24
- package/cjs/components/Header/WalletMenu.style.d.ts +1 -0
- package/cjs/components/Header/WalletMenu.style.js +27 -0
- package/cjs/components/Insurance/InsuranceCollapsed.js +1 -1
- package/cjs/components/NFT/NFT.js +3 -1
- package/cjs/components/NFT/types.d.ts +1 -1
- package/cjs/components/PoweredBy/PoweredBy.js +2 -1
- package/cjs/components/RouteCard/RouteCard.js +3 -3
- package/cjs/components/RouteCard/RouteCardEssentials.js +2 -1
- package/cjs/components/RouteCard/utils.d.ts +2 -3
- package/cjs/components/RouteCard/utils.js +4 -9
- package/cjs/components/SendToWallet/SendToWallet.js +24 -21
- package/cjs/components/SendToWallet/SendToWalletButton.js +3 -2
- package/{pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts → cjs/components/SettingsListItemButton.d.ts} +1 -1
- package/cjs/components/SettingsListItemButton.js +8 -0
- package/cjs/components/Step/DestinationWalletAddress.d.ts +2 -2
- package/cjs/components/Step/GasStepProcess.d.ts +2 -2
- package/cjs/components/Step/Step.d.ts +2 -2
- package/cjs/components/Step/Step.js +1 -1
- package/cjs/components/Step/StepList.d.ts +2 -2
- package/cjs/components/Step/StepList.js +4 -4
- package/cjs/components/Step/StepProcess.d.ts +2 -2
- package/cjs/components/Step/StepTimer.d.ts +2 -2
- package/cjs/components/StepActions/StepActions.d.ts +3 -3
- package/cjs/components/StepActions/StepActions.js +11 -14
- package/cjs/components/StepActions/types.d.ts +2 -2
- package/cjs/components/{Header/NavigationTabs.style.d.ts → Tabs/Tabs.style.d.ts} +2 -2
- package/cjs/components/{Header/NavigationTabs.style.js → Tabs/Tabs.style.js} +9 -31
- package/cjs/components/Tabs/index.d.ts +1 -0
- package/cjs/{providers/SDKProvider → components/Tabs}/index.js +1 -1
- package/cjs/components/Token/Token.d.ts +3 -3
- package/cjs/components/Token/Token.js +5 -5
- package/cjs/components/TokenList/TokenList.js +2 -2
- package/cjs/components/TokenList/TokenListItem.js +9 -5
- package/cjs/components/TokenList/TokenNotFound.js +1 -1
- package/cjs/components/TokenList/VirtualizedTokenList.js +2 -1
- package/cjs/config/queryClient.js +0 -4
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/hooks/index.d.ts +7 -1
- package/cjs/hooks/index.js +7 -1
- package/cjs/hooks/useAccount.d.ts +31 -0
- package/cjs/hooks/useAccount.js +53 -0
- package/cjs/hooks/useAvailableChains.d.ts +6 -0
- package/cjs/hooks/useAvailableChains.js +36 -0
- package/cjs/hooks/useChain.js +3 -6
- package/cjs/hooks/useChains.d.ts +1 -1
- package/cjs/hooks/useChains.js +7 -38
- package/cjs/hooks/useFromTokenSufficiency.d.ts +3 -3
- package/cjs/hooks/useFromTokenSufficiency.js +39 -41
- package/cjs/hooks/useGasRecommendation.d.ts +2 -2
- package/cjs/hooks/useGasRecommendation.js +23 -18
- package/cjs/hooks/useGasRefuel.js +18 -11
- package/cjs/hooks/useGasSufficiency.d.ts +6 -7
- package/cjs/hooks/useGasSufficiency.js +68 -71
- package/cjs/hooks/useLanguages.d.ts +6 -0
- package/cjs/hooks/useLanguages.js +28 -0
- package/cjs/hooks/useProcessMessage.d.ts +3 -3
- package/cjs/hooks/useProcessMessage.js +32 -28
- package/cjs/hooks/useRequiredToAddress.d.ts +1 -0
- package/cjs/hooks/useRequiredToAddress.js +19 -0
- package/cjs/hooks/useRouteExecution.d.ts +2 -2
- package/cjs/hooks/useRouteExecution.js +44 -58
- package/cjs/hooks/useRoutes.d.ts +1 -1
- package/cjs/hooks/useRoutes.js +128 -113
- package/cjs/hooks/useSettingMonitor.d.ts +11 -0
- package/cjs/hooks/useSettingMonitor.js +57 -0
- package/cjs/hooks/useTokenAddressBalance.d.ts +1 -1
- package/cjs/hooks/useTokenBalance.d.ts +5 -3
- package/cjs/hooks/useTokenBalance.js +77 -47
- package/cjs/hooks/useTokenBalances.d.ts +3 -3
- package/cjs/hooks/useTokenBalances.js +34 -24
- package/cjs/hooks/useTokenSearch.js +18 -17
- package/cjs/hooks/useTokens.d.ts +2 -1
- package/cjs/hooks/useTokens.js +18 -15
- package/cjs/hooks/useTools.d.ts +1 -1
- package/cjs/hooks/useTools.js +12 -11
- package/cjs/hooks/useTransactionDetails.d.ts +4 -0
- package/cjs/hooks/useTransactionDetails.js +56 -0
- package/cjs/hooks/useTransactionHistory.d.ts +5 -0
- package/cjs/hooks/useTransactionHistory.js +39 -0
- package/cjs/i18n/en.json +18 -9
- package/cjs/i18n/fr.json +7 -4
- package/cjs/i18n/pt.json +7 -4
- package/cjs/i18n/tr.json +7 -4
- package/cjs/i18n/uk.json +7 -4
- package/cjs/i18n/zh.json +7 -4
- package/cjs/icons/index.d.ts +1 -3
- package/cjs/icons/index.js +1 -3
- package/cjs/icons/lifi.d.ts +1 -0
- package/cjs/icons/lifi.js +4 -0
- package/cjs/index.d.ts +2 -3
- package/cjs/index.js +4 -4
- package/cjs/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +2 -2
- package/cjs/pages/LanguagesPage/LanguagesPage.d.ts +2 -0
- package/cjs/pages/LanguagesPage/LanguagesPage.js +22 -0
- package/cjs/pages/LanguagesPage/index.d.ts +1 -0
- package/cjs/pages/LanguagesPage/index.js +17 -0
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +15 -5
- package/cjs/pages/SelectWalletPage/EVMListItemButton.d.ts +8 -0
- package/cjs/pages/SelectWalletPage/EVMListItemButton.js +40 -0
- package/cjs/pages/SelectWalletPage/SVMListItemButton.d.ts +6 -0
- package/cjs/pages/SelectWalletPage/SVMListItemButton.js +34 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.js +31 -32
- package/cjs/pages/SelectWalletPage/utils.d.ts +3 -0
- package/cjs/pages/SelectWalletPage/utils.js +21 -0
- package/{pages/SettingsPage/EnabledToolsButton.d.ts → cjs/pages/SettingsPage/BridgeAndExchangeSettings.d.ts} +1 -1
- package/cjs/pages/SettingsPage/BridgeAndExchangeSettings.js +36 -0
- package/cjs/pages/SettingsPage/GasPriceSettings.d.ts +2 -0
- package/cjs/pages/SettingsPage/GasPriceSettings.js +21 -0
- package/cjs/pages/SettingsPage/LanguageSetting.d.ts +2 -0
- package/cjs/pages/SettingsPage/LanguageSetting.js +26 -0
- package/cjs/pages/SettingsPage/ResetSettingsButton.js +3 -30
- package/cjs/pages/SettingsPage/RoutePrioritySettings.d.ts +2 -0
- package/cjs/pages/SettingsPage/RoutePrioritySettings.js +25 -0
- package/cjs/pages/SettingsPage/SendToWalletOptionSetting.d.ts +1 -0
- package/cjs/pages/SettingsPage/{ShowDestinationWallet.js → SendToWalletOptionSetting.js} +6 -9
- package/cjs/pages/SettingsPage/SettingsCard/BadgedValue.d.ts +8 -0
- package/cjs/pages/SettingsPage/SettingsCard/BadgedValue.js +7 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCard.d.ts +2 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCard.js +11 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +19 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCard.style.js +53 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCardButton.d.ts +7 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCardButton.js +8 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCardExpandable.d.ts +7 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +16 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingsAccordian.d.ts +6 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingsAccordian.js +36 -0
- package/cjs/pages/SettingsPage/SettingsCard/index.d.ts +6 -0
- package/cjs/pages/SettingsPage/SettingsCard/index.js +22 -0
- package/cjs/pages/SettingsPage/SettingsCard/types.d.ts +5 -0
- package/cjs/pages/SettingsPage/SettingsPage.js +9 -8
- package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.d.ts +2 -0
- package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.js +51 -0
- package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.style.d.ts +16 -0
- package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +74 -0
- package/cjs/pages/SettingsPage/SlippageSettings/index.d.ts +1 -0
- package/cjs/pages/SettingsPage/SlippageSettings/index.js +17 -0
- package/cjs/pages/SettingsPage/ThemeSettings.d.ts +2 -0
- package/cjs/pages/SettingsPage/ThemeSettings.js +39 -0
- package/cjs/pages/TransactionDetailsPage/ContactSupportButton.js +2 -2
- package/cjs/pages/TransactionDetailsPage/TransactionDetailsPage.js +33 -28
- package/cjs/pages/TransactionDetailsPage/TransactionDetailsSkeleton.d.ts +1 -0
- package/cjs/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +31 -0
- package/cjs/pages/TransactionHistoryPage/TransactionHistoryItem.d.ts +4 -2
- package/cjs/pages/TransactionHistoryPage/TransactionHistoryItem.js +34 -7
- package/cjs/pages/TransactionHistoryPage/TransactionHistoryPage.js +21 -22
- package/cjs/pages/TransactionHistoryPage/TransactionHistorySkeleton.d.ts +1 -0
- package/cjs/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +26 -0
- package/cjs/pages/TransactionHistoryPage/constants.d.ts +1 -0
- package/cjs/pages/TransactionHistoryPage/constants.js +4 -0
- package/cjs/pages/TransactionPage/ExchangeRateBottomSheet.js +11 -10
- package/cjs/pages/TransactionPage/StartTransactionButton.js +2 -2
- package/cjs/pages/TransactionPage/StatusBottomSheet.js +12 -8
- package/cjs/pages/TransactionPage/TransactionPage.js +1 -1
- package/cjs/providers/FormProvider/FormUpdater.js +4 -4
- package/cjs/providers/I18nProvider/I18nProvider.js +3 -7
- package/cjs/providers/I18nProvider/types.d.ts +4 -3
- package/cjs/providers/WalletProvider/EVMProvider.d.ts +3 -0
- package/cjs/providers/WalletProvider/EVMProvider.js +79 -0
- package/cjs/providers/WalletProvider/SDKProviders.d.ts +1 -0
- package/cjs/providers/WalletProvider/SDKProviders.js +31 -0
- package/cjs/providers/WalletProvider/SolanaProvider.d.ts +3 -0
- package/cjs/providers/WalletProvider/SolanaProvider.js +35 -0
- package/cjs/providers/WalletProvider/WalletProvider.d.ts +1 -15
- package/cjs/providers/WalletProvider/WalletProvider.js +5 -183
- package/cjs/providers/WalletProvider/index.d.ts +1 -1
- package/cjs/providers/WalletProvider/index.js +1 -1
- package/cjs/providers/WalletProvider/utils.d.ts +3 -0
- package/cjs/providers/WalletProvider/utils.js +25 -0
- package/cjs/providers/WidgetProvider/WidgetProvider.js +51 -35
- package/cjs/providers/index.d.ts +0 -1
- package/cjs/providers/index.js +0 -1
- package/cjs/stores/chains/ChainOrderStore.js +24 -0
- package/cjs/stores/header/useHeaderStore.d.ts +1 -1
- package/cjs/stores/header/useHeaderStore.js +2 -2
- package/cjs/stores/routes/createRouteExecutionStore.js +6 -60
- package/cjs/stores/routes/index.d.ts +0 -1
- package/cjs/stores/routes/index.js +0 -1
- package/cjs/stores/routes/types.d.ts +2 -2
- package/cjs/stores/routes/utils.d.ts +8 -8
- package/cjs/stores/routes/utils.js +7 -5
- package/cjs/stores/settings/useSettingsStore.js +2 -4
- package/cjs/stores/settings/useSplitSubvariantStore.d.ts +1 -1
- package/cjs/stores/settings/useSplitSubvariantStore.js +2 -2
- package/cjs/types/events.d.ts +6 -5
- package/cjs/types/events.js +1 -1
- package/cjs/types/widget.d.ts +7 -14
- package/cjs/utils/colors.d.ts +3 -0
- package/cjs/utils/colors.js +13 -1
- package/cjs/utils/converters.d.ts +3 -0
- package/cjs/utils/converters.js +172 -0
- package/cjs/utils/format.d.ts +1 -1
- package/cjs/utils/format.js +5 -12
- package/cjs/utils/index.d.ts +1 -0
- package/cjs/utils/index.js +1 -0
- package/cjs/utils/navigationRoutes.d.ts +1 -0
- package/cjs/utils/navigationRoutes.js +3 -1
- package/cjs/utils/svm.d.ts +1 -0
- package/cjs/utils/svm.js +14 -0
- package/components/ActiveTransactions/ActiveTransactionItem.js +1 -5
- package/components/ActiveTransactions/ActiveTransactions.js +2 -2
- package/components/AmountInput/AmountInputEndAdornment.js +10 -11
- package/components/AmountInput/FormPriceHelperText.js +1 -1
- package/components/BaseTransactionButton/BaseTransactionButton.js +6 -5
- package/components/Card/CardLabel.d.ts +1 -1
- package/components/ChainSelect/ChainSelect.js +8 -5
- package/components/ChainSelect/useChainSelect.js +22 -3
- package/components/GasMessage/GasMessage.style.js +3 -6
- package/components/GasMessage/GasSufficiencyMessage.js +2 -1
- package/components/Header/Header.style.d.ts +8 -0
- package/components/Header/Header.style.js +16 -1
- package/components/Header/NavigationHeader.d.ts +1 -0
- package/components/Header/NavigationHeader.js +16 -10
- package/components/Header/NavigationTabs.js +3 -3
- package/components/Header/SettingsButton.d.ts +1 -0
- package/components/Header/SettingsButton.js +21 -0
- package/components/Header/SettingsButton.style.d.ts +11 -0
- package/components/Header/SettingsButton.style.js +40 -0
- package/components/Header/WalletHeader.js +15 -28
- package/components/Header/WalletMenu.d.ts +3 -1
- package/components/Header/WalletMenu.js +58 -25
- package/components/Header/WalletMenu.style.d.ts +1 -0
- package/components/Header/WalletMenu.style.js +24 -0
- package/components/Insurance/InsuranceCollapsed.js +1 -1
- package/components/NFT/NFT.js +3 -1
- package/components/NFT/types.d.ts +1 -1
- package/components/PoweredBy/PoweredBy.js +2 -1
- package/components/RouteCard/RouteCard.js +3 -3
- package/components/RouteCard/RouteCardEssentials.js +2 -1
- package/components/RouteCard/utils.d.ts +2 -3
- package/components/RouteCard/utils.js +4 -9
- package/components/SendToWallet/SendToWallet.js +26 -23
- package/components/SendToWallet/SendToWalletButton.js +5 -4
- package/{cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts → components/SettingsListItemButton.d.ts} +1 -1
- package/components/SettingsListItemButton.js +5 -0
- package/components/Step/DestinationWalletAddress.d.ts +2 -2
- package/components/Step/GasStepProcess.d.ts +2 -2
- package/components/Step/Step.d.ts +2 -2
- package/components/Step/Step.js +2 -2
- package/components/Step/StepList.d.ts +2 -2
- package/components/Step/StepList.js +4 -4
- package/components/Step/StepProcess.d.ts +2 -2
- package/components/Step/StepTimer.d.ts +2 -2
- package/components/StepActions/StepActions.d.ts +3 -3
- package/components/StepActions/StepActions.js +12 -15
- package/components/StepActions/types.d.ts +2 -2
- package/components/{Header/NavigationTabs.style.d.ts → Tabs/Tabs.style.d.ts} +2 -2
- package/components/Tabs/Tabs.style.js +36 -0
- package/components/Tabs/index.d.ts +1 -0
- package/components/Tabs/index.js +1 -0
- package/components/Token/Token.d.ts +3 -3
- package/components/Token/Token.js +5 -5
- package/components/TokenList/TokenList.js +4 -4
- package/components/TokenList/TokenListItem.js +9 -6
- package/components/TokenList/TokenNotFound.js +2 -2
- package/components/TokenList/VirtualizedTokenList.js +2 -1
- package/config/queryClient.js +0 -4
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/index.d.ts +7 -1
- package/hooks/index.js +7 -1
- package/hooks/useAccount.d.ts +31 -0
- package/hooks/useAccount.js +48 -0
- package/hooks/useAvailableChains.d.ts +6 -0
- package/hooks/useAvailableChains.js +32 -0
- package/hooks/useChain.js +3 -6
- package/hooks/useChains.d.ts +1 -1
- package/hooks/useChains.js +9 -40
- package/hooks/useFromTokenSufficiency.d.ts +3 -3
- package/hooks/useFromTokenSufficiency.js +41 -43
- package/hooks/useGasRecommendation.d.ts +2 -2
- package/hooks/useGasRecommendation.js +23 -18
- package/hooks/useGasRefuel.js +19 -12
- package/hooks/useGasSufficiency.d.ts +6 -7
- package/hooks/useGasSufficiency.js +69 -72
- package/hooks/useLanguages.d.ts +6 -0
- package/hooks/useLanguages.js +24 -0
- package/hooks/useProcessMessage.d.ts +3 -3
- package/hooks/useProcessMessage.js +33 -29
- package/hooks/useRequiredToAddress.d.ts +1 -0
- package/hooks/useRequiredToAddress.js +15 -0
- package/hooks/useRouteExecution.d.ts +2 -2
- package/hooks/useRouteExecution.js +44 -58
- package/hooks/useRoutes.d.ts +1 -1
- package/hooks/useRoutes.js +131 -116
- package/hooks/useSettingMonitor.d.ts +11 -0
- package/hooks/useSettingMonitor.js +53 -0
- package/hooks/useTokenAddressBalance.d.ts +1 -1
- package/hooks/useTokenBalance.d.ts +5 -3
- package/hooks/useTokenBalance.js +74 -45
- package/hooks/useTokenBalances.d.ts +3 -3
- package/hooks/useTokenBalances.js +34 -24
- package/hooks/useTokenSearch.js +18 -17
- package/hooks/useTokens.d.ts +2 -1
- package/hooks/useTokens.js +19 -16
- package/hooks/useTools.d.ts +1 -1
- package/hooks/useTools.js +13 -12
- package/hooks/useTransactionDetails.d.ts +4 -0
- package/hooks/useTransactionDetails.js +52 -0
- package/hooks/useTransactionHistory.d.ts +5 -0
- package/hooks/useTransactionHistory.js +35 -0
- package/i18n/en.json +18 -9
- package/i18n/fr.json +7 -4
- package/i18n/pt.json +7 -4
- package/i18n/tr.json +7 -4
- package/i18n/uk.json +7 -4
- package/i18n/zh.json +7 -4
- package/icons/index.d.ts +1 -3
- package/icons/index.js +1 -3
- package/icons/lifi.d.ts +1 -0
- package/icons/lifi.js +1 -0
- package/index.d.ts +2 -3
- package/index.js +2 -4
- package/package.json +19 -19
- package/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +2 -2
- package/pages/LanguagesPage/LanguagesPage.d.ts +2 -0
- package/pages/LanguagesPage/LanguagesPage.js +18 -0
- package/pages/LanguagesPage/index.d.ts +1 -0
- package/pages/LanguagesPage/index.js +1 -0
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +16 -6
- package/pages/SelectWalletPage/EVMListItemButton.d.ts +8 -0
- package/pages/SelectWalletPage/EVMListItemButton.js +36 -0
- package/pages/SelectWalletPage/SVMListItemButton.d.ts +6 -0
- package/pages/SelectWalletPage/SVMListItemButton.js +30 -0
- package/pages/SelectWalletPage/SelectWalletPage.js +34 -35
- package/pages/SelectWalletPage/utils.d.ts +3 -0
- package/pages/SelectWalletPage/utils.js +17 -0
- package/{cjs/pages/SettingsPage/EnabledToolsButton.d.ts → pages/SettingsPage/BridgeAndExchangeSettings.d.ts} +1 -1
- package/pages/SettingsPage/BridgeAndExchangeSettings.js +32 -0
- package/pages/SettingsPage/GasPriceSettings.d.ts +2 -0
- package/pages/SettingsPage/GasPriceSettings.js +17 -0
- package/pages/SettingsPage/LanguageSetting.d.ts +2 -0
- package/pages/SettingsPage/LanguageSetting.js +22 -0
- package/pages/SettingsPage/ResetSettingsButton.js +4 -31
- package/pages/SettingsPage/RoutePrioritySettings.d.ts +2 -0
- package/pages/SettingsPage/RoutePrioritySettings.js +21 -0
- package/pages/SettingsPage/SendToWalletOptionSetting.d.ts +1 -0
- package/pages/SettingsPage/{ShowDestinationWallet.js → SendToWalletOptionSetting.js} +4 -7
- package/pages/SettingsPage/SettingsCard/BadgedValue.d.ts +8 -0
- package/pages/SettingsPage/SettingsCard/BadgedValue.js +3 -0
- package/pages/SettingsPage/SettingsCard/SettingCard.d.ts +2 -0
- package/pages/SettingsPage/SettingsCard/SettingCard.js +7 -0
- package/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +19 -0
- package/pages/SettingsPage/SettingsCard/SettingCard.style.js +50 -0
- package/pages/SettingsPage/SettingsCard/SettingCardButton.d.ts +7 -0
- package/pages/SettingsPage/SettingsCard/SettingCardButton.js +4 -0
- package/pages/SettingsPage/SettingsCard/SettingCardExpandable.d.ts +7 -0
- package/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +12 -0
- package/pages/SettingsPage/SettingsCard/SettingsAccordian.d.ts +6 -0
- package/pages/SettingsPage/SettingsCard/SettingsAccordian.js +31 -0
- package/pages/SettingsPage/SettingsCard/index.d.ts +6 -0
- package/pages/SettingsPage/SettingsCard/index.js +6 -0
- package/pages/SettingsPage/SettingsCard/types.d.ts +5 -0
- package/pages/SettingsPage/SettingsPage.js +10 -9
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.d.ts +2 -0
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.js +47 -0
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.style.d.ts +16 -0
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +71 -0
- package/pages/SettingsPage/SlippageSettings/index.d.ts +1 -0
- package/pages/SettingsPage/SlippageSettings/index.js +1 -0
- package/pages/SettingsPage/ThemeSettings.d.ts +2 -0
- package/pages/SettingsPage/ThemeSettings.js +35 -0
- package/pages/TransactionDetailsPage/ContactSupportButton.js +2 -2
- package/pages/TransactionDetailsPage/TransactionDetailsPage.js +38 -33
- package/pages/TransactionDetailsPage/TransactionDetailsSkeleton.d.ts +1 -0
- package/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +27 -0
- package/pages/TransactionHistoryPage/TransactionHistoryItem.d.ts +4 -2
- package/pages/TransactionHistoryPage/TransactionHistoryItem.js +34 -7
- package/pages/TransactionHistoryPage/TransactionHistoryPage.js +24 -25
- package/pages/TransactionHistoryPage/TransactionHistorySkeleton.d.ts +1 -0
- package/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +22 -0
- package/pages/TransactionHistoryPage/constants.d.ts +1 -0
- package/pages/TransactionHistoryPage/constants.js +1 -0
- package/pages/TransactionPage/ExchangeRateBottomSheet.js +11 -10
- package/pages/TransactionPage/StartTransactionButton.js +2 -2
- package/pages/TransactionPage/StatusBottomSheet.js +14 -10
- package/pages/TransactionPage/TransactionPage.js +1 -1
- package/providers/FormProvider/FormUpdater.js +4 -4
- package/providers/I18nProvider/I18nProvider.js +4 -8
- package/providers/I18nProvider/types.d.ts +4 -3
- package/providers/WalletProvider/EVMProvider.d.ts +3 -0
- package/providers/WalletProvider/EVMProvider.js +74 -0
- package/providers/WalletProvider/SDKProviders.d.ts +1 -0
- package/providers/WalletProvider/SDKProviders.js +27 -0
- package/providers/WalletProvider/SolanaProvider.d.ts +3 -0
- package/providers/WalletProvider/SolanaProvider.js +30 -0
- package/providers/WalletProvider/WalletProvider.d.ts +1 -15
- package/providers/WalletProvider/WalletProvider.js +5 -181
- package/providers/WalletProvider/index.d.ts +1 -1
- package/providers/WalletProvider/index.js +1 -1
- package/providers/WalletProvider/utils.d.ts +3 -0
- package/providers/WalletProvider/utils.js +21 -0
- package/providers/WidgetProvider/WidgetProvider.js +52 -36
- package/providers/index.d.ts +0 -1
- package/providers/index.js +0 -1
- package/stores/chains/ChainOrderStore.js +25 -1
- package/stores/header/useHeaderStore.d.ts +1 -1
- package/stores/header/useHeaderStore.js +2 -2
- package/stores/routes/createRouteExecutionStore.js +6 -60
- package/stores/routes/index.d.ts +0 -1
- package/stores/routes/index.js +0 -1
- package/stores/routes/types.d.ts +2 -2
- package/stores/routes/utils.d.ts +8 -8
- package/stores/routes/utils.js +5 -3
- package/stores/settings/useSettingsStore.js +2 -4
- package/stores/settings/useSplitSubvariantStore.d.ts +1 -1
- package/stores/settings/useSplitSubvariantStore.js +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/types/events.d.ts +6 -5
- package/types/events.js +1 -1
- package/types/widget.d.ts +7 -14
- package/utils/colors.d.ts +3 -0
- package/utils/colors.js +10 -1
- package/utils/converters.d.ts +3 -0
- package/utils/converters.js +168 -0
- package/utils/format.d.ts +1 -1
- package/utils/format.js +5 -12
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/navigationRoutes.d.ts +1 -0
- package/utils/navigationRoutes.js +3 -1
- package/utils/svm.d.ts +1 -0
- package/utils/svm.js +10 -0
- package/cjs/components/LiFiLogo.d.ts +0 -5
- package/cjs/components/LiFiLogo.js +0 -10
- package/cjs/fonts/Inter-Black.woff +0 -0
- package/cjs/fonts/Inter-Black.woff2 +0 -0
- package/cjs/fonts/Inter-BlackItalic.woff +0 -0
- package/cjs/fonts/Inter-BlackItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Bold.woff +0 -0
- package/cjs/fonts/Inter-Bold.woff2 +0 -0
- package/cjs/fonts/Inter-BoldItalic.woff +0 -0
- package/cjs/fonts/Inter-BoldItalic.woff2 +0 -0
- package/cjs/fonts/Inter-ExtraBold.woff +0 -0
- package/cjs/fonts/Inter-ExtraBold.woff2 +0 -0
- package/cjs/fonts/Inter-ExtraBoldItalic.woff +0 -0
- package/cjs/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
- package/cjs/fonts/Inter-ExtraLight.woff +0 -0
- package/cjs/fonts/Inter-ExtraLight.woff2 +0 -0
- package/cjs/fonts/Inter-ExtraLightItalic.woff +0 -0
- package/cjs/fonts/Inter-ExtraLightItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Italic.woff +0 -0
- package/cjs/fonts/Inter-Italic.woff2 +0 -0
- package/cjs/fonts/Inter-Light.woff +0 -0
- package/cjs/fonts/Inter-Light.woff2 +0 -0
- package/cjs/fonts/Inter-LightItalic.woff +0 -0
- package/cjs/fonts/Inter-LightItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Medium.woff +0 -0
- package/cjs/fonts/Inter-Medium.woff2 +0 -0
- package/cjs/fonts/Inter-MediumItalic.woff +0 -0
- package/cjs/fonts/Inter-MediumItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Regular.woff +0 -0
- package/cjs/fonts/Inter-Regular.woff2 +0 -0
- package/cjs/fonts/Inter-SemiBold.woff +0 -0
- package/cjs/fonts/Inter-SemiBold.woff2 +0 -0
- package/cjs/fonts/Inter-SemiBoldItalic.woff +0 -0
- package/cjs/fonts/Inter-SemiBoldItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Thin.woff +0 -0
- package/cjs/fonts/Inter-Thin.woff2 +0 -0
- package/cjs/fonts/Inter-ThinItalic.woff +0 -0
- package/cjs/fonts/Inter-ThinItalic.woff2 +0 -0
- package/cjs/fonts/Inter-italic.var.woff2 +0 -0
- package/cjs/fonts/Inter-roman.var.woff2 +0 -0
- package/cjs/fonts/Inter.var.woff2 +0 -0
- package/cjs/fonts/inter.css +0 -217
- package/cjs/hooks/useGetTokenBalancesWithRetry.d.ts +0 -3
- package/cjs/hooks/useGetTokenBalancesWithRetry.js +0 -33
- package/cjs/icons/LiFiFullLogo.d.ts +0 -2
- package/cjs/icons/LiFiFullLogo.js +0 -6
- package/cjs/icons/LiFiLogo.d.ts +0 -2
- package/cjs/icons/LiFiLogo.js +0 -6
- package/cjs/icons/LiFiToolLogo.d.ts +0 -2
- package/cjs/icons/LiFiToolLogo.js +0 -6
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +0 -8
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.d.ts +0 -2
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +0 -27
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +0 -4
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.js +0 -19
- package/cjs/pages/SettingsPage/EnabledToolsButton.js +0 -25
- package/cjs/pages/SettingsPage/EnabledToolsButton.style.d.ts +0 -5
- package/cjs/pages/SettingsPage/EnabledToolsButton.style.js +0 -17
- package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
- package/cjs/pages/SettingsPage/GasPriceSelect.js +0 -17
- package/cjs/pages/SettingsPage/LanguageSelect.d.ts +0 -2
- package/cjs/pages/SettingsPage/LanguageSelect.js +0 -37
- package/cjs/pages/SettingsPage/RoutePrioritySelect.d.ts +0 -2
- package/cjs/pages/SettingsPage/RoutePrioritySelect.js +0 -23
- package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
- package/cjs/pages/SettingsPage/SlippageInput.d.ts +0 -1
- package/cjs/pages/SettingsPage/SlippageInput.js +0 -30
- package/cjs/providers/SDKProvider/SDKProvider.d.ts +0 -4
- package/cjs/providers/SDKProvider/SDKProvider.js +0 -41
- package/cjs/providers/SDKProvider/index.d.ts +0 -1
- package/cjs/providers/WalletProvider/types.d.ts +0 -17
- package/cjs/stores/routes/useTransactionHistory.d.ts +0 -2
- package/cjs/stores/routes/useTransactionHistory.js +0 -15
- package/components/Header/NavigationTabs.style.js +0 -58
- package/components/LiFiLogo.d.ts +0 -5
- package/components/LiFiLogo.js +0 -6
- package/fonts/Inter-Black.woff +0 -0
- package/fonts/Inter-Black.woff2 +0 -0
- package/fonts/Inter-BlackItalic.woff +0 -0
- package/fonts/Inter-BlackItalic.woff2 +0 -0
- package/fonts/Inter-Bold.woff +0 -0
- package/fonts/Inter-Bold.woff2 +0 -0
- package/fonts/Inter-BoldItalic.woff +0 -0
- package/fonts/Inter-BoldItalic.woff2 +0 -0
- package/fonts/Inter-ExtraBold.woff +0 -0
- package/fonts/Inter-ExtraBold.woff2 +0 -0
- package/fonts/Inter-ExtraBoldItalic.woff +0 -0
- package/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter-ExtraLight.woff +0 -0
- package/fonts/Inter-ExtraLight.woff2 +0 -0
- package/fonts/Inter-ExtraLightItalic.woff +0 -0
- package/fonts/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter-Italic.woff +0 -0
- package/fonts/Inter-Italic.woff2 +0 -0
- package/fonts/Inter-Light.woff +0 -0
- package/fonts/Inter-Light.woff2 +0 -0
- package/fonts/Inter-LightItalic.woff +0 -0
- package/fonts/Inter-LightItalic.woff2 +0 -0
- package/fonts/Inter-Medium.woff +0 -0
- package/fonts/Inter-Medium.woff2 +0 -0
- package/fonts/Inter-MediumItalic.woff +0 -0
- package/fonts/Inter-MediumItalic.woff2 +0 -0
- package/fonts/Inter-Regular.woff +0 -0
- package/fonts/Inter-Regular.woff2 +0 -0
- package/fonts/Inter-SemiBold.woff +0 -0
- package/fonts/Inter-SemiBold.woff2 +0 -0
- package/fonts/Inter-SemiBoldItalic.woff +0 -0
- package/fonts/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter-Thin.woff +0 -0
- package/fonts/Inter-Thin.woff2 +0 -0
- package/fonts/Inter-ThinItalic.woff +0 -0
- package/fonts/Inter-ThinItalic.woff2 +0 -0
- package/fonts/Inter-italic.var.woff2 +0 -0
- package/fonts/Inter-roman.var.woff2 +0 -0
- package/fonts/Inter.var.woff2 +0 -0
- package/fonts/inter.css +0 -217
- package/hooks/useGetTokenBalancesWithRetry.d.ts +0 -3
- package/hooks/useGetTokenBalancesWithRetry.js +0 -29
- package/icons/LiFiFullLogo.d.ts +0 -2
- package/icons/LiFiFullLogo.js +0 -2
- package/icons/LiFiLogo.d.ts +0 -2
- package/icons/LiFiLogo.js +0 -2
- package/icons/LiFiToolLogo.d.ts +0 -2
- package/icons/LiFiToolLogo.js +0 -2
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +0 -5
- package/pages/SettingsPage/ColorSchemeButtonGroup.d.ts +0 -2
- package/pages/SettingsPage/ColorSchemeButtonGroup.js +0 -23
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +0 -4
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.js +0 -16
- package/pages/SettingsPage/EnabledToolsButton.js +0 -21
- package/pages/SettingsPage/EnabledToolsButton.style.d.ts +0 -5
- package/pages/SettingsPage/EnabledToolsButton.style.js +0 -14
- package/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
- package/pages/SettingsPage/GasPriceSelect.js +0 -13
- package/pages/SettingsPage/LanguageSelect.d.ts +0 -2
- package/pages/SettingsPage/LanguageSelect.js +0 -33
- package/pages/SettingsPage/RoutePrioritySelect.d.ts +0 -2
- package/pages/SettingsPage/RoutePrioritySelect.js +0 -19
- package/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
- package/pages/SettingsPage/SlippageInput.d.ts +0 -1
- package/pages/SettingsPage/SlippageInput.js +0 -26
- package/providers/SDKProvider/SDKProvider.d.ts +0 -4
- package/providers/SDKProvider/SDKProvider.js +0 -36
- package/providers/SDKProvider/index.d.ts +0 -1
- package/providers/SDKProvider/index.js +0 -1
- package/providers/WalletProvider/types.d.ts +0 -17
- package/stores/routes/useTransactionHistory.d.ts +0 -2
- package/stores/routes/useTransactionHistory.js +0 -11
- /package/cjs/{providers/WalletProvider → pages/SettingsPage/SettingsCard}/types.js +0 -0
- /package/{providers/WalletProvider → pages/SettingsPage/SettingsCard}/types.js +0 -0
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Dialog } from '../../components/Dialog';
|
|
7
|
-
import { useWallet } from '../../providers';
|
|
8
|
-
import { useHeaderStoreContext, useRouteExecutionStore } from '../../stores';
|
|
9
|
-
import { useTransactionHistory } from '../../stores/routes';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Container, List } from '@mui/material';
|
|
3
|
+
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
4
|
+
import { useRef } from 'react';
|
|
5
|
+
import { useTransactionHistory } from '../../hooks/useTransactionHistory';
|
|
10
6
|
import { TransactionHistoryEmpty } from './TransactionHistoryEmpty';
|
|
11
7
|
import { TransactionHistoryItem } from './TransactionHistoryItem';
|
|
8
|
+
import { TransactionHistorySkeleton } from './TransactionHistorySkeleton';
|
|
9
|
+
import { minTransactionListHeight } from './constants';
|
|
12
10
|
export const TransactionHistoryPage = () => {
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const transactions = useTransactionHistory(
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, [transactions.length, toggleDialog, headerStoreContext]);
|
|
27
|
-
if (!transactions.length) {
|
|
11
|
+
// Parent ref and useVirtualizer should be in one file to avoid blank page (0 virtual items) issue
|
|
12
|
+
const parentRef = useRef(null);
|
|
13
|
+
const { data: transactions, isLoading } = useTransactionHistory();
|
|
14
|
+
const { getVirtualItems, getTotalSize } = useVirtualizer({
|
|
15
|
+
count: transactions.length,
|
|
16
|
+
overscan: 10,
|
|
17
|
+
paddingStart: 8,
|
|
18
|
+
paddingEnd: 12,
|
|
19
|
+
getScrollElement: () => parentRef.current,
|
|
20
|
+
estimateSize: () => 194,
|
|
21
|
+
getItemKey: (index) => `${transactions[index].transactionId}-${index}`,
|
|
22
|
+
});
|
|
23
|
+
if (!transactions.length && !isLoading) {
|
|
28
24
|
return _jsx(TransactionHistoryEmpty, {});
|
|
29
25
|
}
|
|
30
|
-
return (
|
|
26
|
+
return (_jsx(Container, { ref: parentRef, style: { height: minTransactionListHeight, overflow: 'auto' }, children: _jsx(List, { style: { height: getTotalSize(), width: '100%', position: 'relative' }, disablePadding: true, children: isLoading ? (_jsx(List, { disablePadding: true, sx: { paddingTop: 1 }, children: Array.from({ length: 3 }).map((_, index) => (_jsx(TransactionHistorySkeleton, {}, index))) })) : (getVirtualItems().map((item) => {
|
|
27
|
+
const transaction = transactions[item.index];
|
|
28
|
+
return (_jsx(TransactionHistoryItem, { size: item.size, start: item.start, transaction: transaction }, item.key));
|
|
29
|
+
})) }) }));
|
|
31
30
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TransactionHistorySkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Skeleton } from '@mui/material';
|
|
3
|
+
import { Card } from '../../components/Card';
|
|
4
|
+
import { TokenDivider } from '../../components/Token';
|
|
5
|
+
const TokenSkeleton = ({ showDivider }) => {
|
|
6
|
+
return (_jsxs(Box, { flex: 1, px: 2, pt: showDivider ? 1 : 0.5, pb: showDivider ? 0 : 1, children: [_jsxs(Box, { display: "flex", flex: 1, alignItems: "center", children: [_jsx(Skeleton, { variant: "rounded", width: 32, height: 32, sx: {
|
|
7
|
+
borderRadius: '100%',
|
|
8
|
+
} }), _jsx(Box, { display: "flex", flexDirection: "column", flex: 1, ml: 2, children: _jsx(Skeleton, { width: 40, height: 30, variant: "text" }) })] }), _jsxs(Box, { display: "flex", marginLeft: "-16px", children: [_jsx(Box, { display: "flex", flexDirection: 'column', marginTop: 0.5, visibility: showDivider ? 'visible' : 'hidden', children: _jsx(TokenDivider, {}) }), _jsx(Skeleton, { width: 64, height: 12, sx: { marginTop: 0.5 }, variant: "rounded" }), _jsx(Skeleton, { width: 96, height: 12, variant: "rounded", sx: { marginTop: 0.5, marginLeft: 0.5 } })] })] }));
|
|
9
|
+
};
|
|
10
|
+
export const TransactionHistorySkeleton = () => {
|
|
11
|
+
return (_jsxs(Card, { style: {
|
|
12
|
+
marginBottom: '16px',
|
|
13
|
+
}, children: [_jsxs(Box, { sx: {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flex: 1,
|
|
16
|
+
justifyContent: 'space-between',
|
|
17
|
+
}, pt: 2, px: 2, children: [_jsx(Skeleton, { variant: "rectangular", width: 96, height: 16, sx: (theme) => ({
|
|
18
|
+
borderRadius: `${theme.shape.borderRadius}px`,
|
|
19
|
+
}) }), _jsx(Skeleton, { variant: "rectangular", width: 64, height: 16, sx: (theme) => ({
|
|
20
|
+
borderRadius: `${theme.shape.borderRadius}px`,
|
|
21
|
+
}) })] }), _jsxs(Box, { py: 1, children: [_jsx(TokenSkeleton, { showDivider: true }), _jsx(TokenDivider, {}), _jsx(TokenSkeleton, {})] })] }));
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const minTransactionListHeight = 544;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const minTransactionListHeight = 544;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import WarningRoundedIcon from '@mui/icons-material/WarningRounded';
|
|
3
3
|
import { Box, Button, Typography } from '@mui/material';
|
|
4
|
-
import Big from 'big.js';
|
|
5
4
|
import { forwardRef, useCallback, useImperativeHandle, useRef, useState, } from 'react';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
7
6
|
import { BottomSheet } from '../../components/BottomSheet';
|
|
@@ -44,15 +43,17 @@ const ExchangeRateBottomSheetContent = ({ data, onCancel, onContinue }) => {
|
|
|
44
43
|
const { t } = useTranslation();
|
|
45
44
|
const ref = useRef();
|
|
46
45
|
useSetContentHeight(ref);
|
|
47
|
-
|
|
46
|
+
if (!data) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const oldAmount = BigInt(data.oldToAmount || 1);
|
|
50
|
+
const rateChange = ((Number((BigInt(data.newToAmount || 0) * 1000000n) / oldAmount) /
|
|
51
|
+
1000000) *
|
|
52
|
+
100 -
|
|
53
|
+
100).toFixed(2);
|
|
48
54
|
return (_jsxs(Box, { p: 3, ref: ref, children: [_jsxs(CenterContainer, { children: [_jsx(IconCircle, { status: "warning", mb: 1, children: _jsx(WarningRoundedIcon, { color: "warning" }) }), _jsx(Typography, { py: 1, fontSize: 18, fontWeight: 700, children: t('warning.title.rateChanged') })] }), _jsx(Typography, { py: 1, children: t('warning.message.rateChanged') }), _jsxs(Box, { display: "flex", justifyContent: "space-between", mt: 1, children: [_jsx(Typography, { children: t('main.quotedAmount') }), _jsxs(Typography, { fontWeight: 600, children: [t('format.number', {
|
|
49
|
-
value: formatTokenAmount(data
|
|
55
|
+
value: formatTokenAmount(BigInt(data.oldToAmount), data.toToken.decimals, 5),
|
|
50
56
|
}), ' ', data?.toToken.symbol] })] }), _jsxs(Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [_jsx(Typography, { children: t('main.currentAmount') }), _jsxs(Typography, { fontWeight: 600, children: [t('format.number', {
|
|
51
|
-
value: formatTokenAmount(data?.newToAmount, data?.toToken.decimals, 5),
|
|
52
|
-
}), ' ', data?.toToken.symbol] })] }), _jsxs(Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [_jsx(Typography, { children: t('main.rateChange') }), _jsxs(Typography, { fontWeight: 600, children: [
|
|
53
|
-
.div(oldAmount.eq(0) ? Big(1) : oldAmount)
|
|
54
|
-
.minus(1)
|
|
55
|
-
.mul(100)
|
|
56
|
-
.round(2, Big.roundUp)
|
|
57
|
-
.toString(), "%"] })] }), _jsxs(Box, { display: "flex", mt: 3, children: [_jsx(Button, { variant: "text", onClick: onCancel, fullWidth: true, children: t('button.cancel') }), _jsx(Box, { display: "flex", p: 1 }), _jsx(Button, { variant: "contained", onClick: onContinue, fullWidth: true, children: t('button.continue') })] })] }));
|
|
57
|
+
value: formatTokenAmount(BigInt(data?.newToAmount), data?.toToken.decimals, 5),
|
|
58
|
+
}), ' ', data?.toToken.symbol] })] }), _jsxs(Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [_jsx(Typography, { children: t('main.rateChange') }), _jsxs(Typography, { fontWeight: 600, children: [rateChange, "%"] })] }), _jsxs(Box, { display: "flex", mt: 3, children: [_jsx(Button, { variant: "text", onClick: onCancel, fullWidth: true, children: t('button.cancel') }), _jsx(Box, { display: "flex", p: 1 }), _jsx(Button, { variant: "contained", onClick: onContinue, fullWidth: true, children: t('button.continue') })] })] }));
|
|
58
59
|
};
|
|
@@ -3,8 +3,8 @@ import { BaseTransactionButton } from '../../components/BaseTransactionButton';
|
|
|
3
3
|
import { useFromTokenSufficiency, useGasSufficiency, useRoutes, } from '../../hooks';
|
|
4
4
|
import { useRouteExecutionStore } from '../../stores';
|
|
5
5
|
export const StartTransactionButton = ({ onClick, route, text, loading, }) => {
|
|
6
|
-
const { insufficientGas,
|
|
7
|
-
const { insufficientFromToken,
|
|
6
|
+
const { insufficientGas, isLoading: isGasSufficiencyLoading } = useGasSufficiency(route);
|
|
7
|
+
const { insufficientFromToken, isLoading: isFromTokenSufficiencyLoading } = useFromTokenSufficiency(route);
|
|
8
8
|
const shouldDisableButton = insufficientFromToken || !!insufficientGas?.length;
|
|
9
9
|
return (_jsx(BaseTransactionButton, { onClick: onClick, text: text, disabled: shouldDisableButton, loading: isFromTokenSufficiencyLoading || isGasSufficiencyLoading || loading }));
|
|
10
10
|
};
|
|
@@ -9,25 +9,25 @@ import { useFormContext } from 'react-hook-form';
|
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
10
|
import { BottomSheet } from '../../components/BottomSheet';
|
|
11
11
|
import { Token } from '../../components/Token';
|
|
12
|
-
import { getProcessMessage,
|
|
12
|
+
import { getProcessMessage, useAvailableChains, useNavigateBack, useTokenBalance, } from '../../hooks';
|
|
13
13
|
import { FormKey, useWidgetConfig } from '../../providers';
|
|
14
|
-
import { RouteExecutionStatus } from '../../stores';
|
|
14
|
+
import { RouteExecutionStatus, getSourceTxHash } from '../../stores';
|
|
15
15
|
import { formatTokenAmount, hasEnumFlag, navigationRoutes, shortenAddress, } from '../../utils';
|
|
16
16
|
import { CenterContainer, IconCircle } from './StatusBottomSheet.style';
|
|
17
17
|
export const StatusBottomSheet = ({ status, route, }) => {
|
|
18
18
|
const { t } = useTranslation();
|
|
19
19
|
const { navigateBack, navigate } = useNavigateBack();
|
|
20
20
|
const ref = useRef(null);
|
|
21
|
-
const { getChainById } =
|
|
21
|
+
const { getChainById } = useAvailableChains();
|
|
22
22
|
const { setValue } = useFormContext();
|
|
23
23
|
const { subvariant, contractComponent, contractSecondaryComponent, contractCompactComponent, } = useWidgetConfig();
|
|
24
24
|
const toToken = {
|
|
25
25
|
...(route.steps.at(-1)?.execution?.toToken ?? route.toToken),
|
|
26
|
-
amount: route.steps.at(-1)?.execution?.toAmount ??
|
|
26
|
+
amount: BigInt(route.steps.at(-1)?.execution?.toAmount ??
|
|
27
27
|
route.steps.at(-1)?.estimate.toAmount ??
|
|
28
|
-
route.toAmount,
|
|
28
|
+
route.toAmount),
|
|
29
29
|
};
|
|
30
|
-
const { token, refetch, refetchNewBalance, refetchAllBalances } = useTokenBalance(
|
|
30
|
+
const { token, refetch, refetchNewBalance, refetchAllBalances } = useTokenBalance(route.toAddress, toToken);
|
|
31
31
|
const clearFromAmount = () => {
|
|
32
32
|
refetchAllBalances();
|
|
33
33
|
setValue(FormKey.FromAmount, '');
|
|
@@ -59,8 +59,12 @@ export const StatusBottomSheet = ({ status, route, }) => {
|
|
|
59
59
|
};
|
|
60
60
|
const handleSeeDetails = () => {
|
|
61
61
|
handleClose();
|
|
62
|
+
const transactionHash = getSourceTxHash(route);
|
|
62
63
|
navigate(navigationRoutes.transactionDetails, {
|
|
63
|
-
state: {
|
|
64
|
+
state: {
|
|
65
|
+
routeId: route.id,
|
|
66
|
+
transactionHash,
|
|
67
|
+
},
|
|
64
68
|
replace: true,
|
|
65
69
|
});
|
|
66
70
|
};
|
|
@@ -77,7 +81,7 @@ export const StatusBottomSheet = ({ status, route, }) => {
|
|
|
77
81
|
: t(`success.title.${transactionType}Successful`);
|
|
78
82
|
if (token) {
|
|
79
83
|
primaryMessage = t('success.message.exchangeSuccessful', {
|
|
80
|
-
amount: formatTokenAmount(token.amount),
|
|
84
|
+
amount: formatTokenAmount(token.amount, token.decimals),
|
|
81
85
|
tokenSymbol: token.symbol,
|
|
82
86
|
chainName: getChainById(token.chainId)?.name,
|
|
83
87
|
walletAddress: shortenAddress(route.toAddress),
|
|
@@ -94,7 +98,7 @@ export const StatusBottomSheet = ({ status, route, }) => {
|
|
|
94
98
|
});
|
|
95
99
|
if (token) {
|
|
96
100
|
secondaryMessage = t('success.message.exchangeSuccessful', {
|
|
97
|
-
amount: formatTokenAmount(token.amount),
|
|
101
|
+
amount: formatTokenAmount(token.amount, token.decimals),
|
|
98
102
|
tokenSymbol: token.symbol,
|
|
99
103
|
chainName: getChainById(token.chainId)?.name,
|
|
100
104
|
walletAddress: shortenAddress(route.toAddress),
|
|
@@ -111,7 +115,7 @@ export const StatusBottomSheet = ({ status, route, }) => {
|
|
|
111
115
|
});
|
|
112
116
|
if (token) {
|
|
113
117
|
secondaryMessage = t('success.message.exchangeSuccessful', {
|
|
114
|
-
amount: formatTokenAmount(token.amount),
|
|
118
|
+
amount: formatTokenAmount(token.amount, token.decimals),
|
|
115
119
|
tokenSymbol: token.symbol,
|
|
116
120
|
chainName: getChainById(token.chainId)?.name,
|
|
117
121
|
walletAddress: shortenAddress(route.toAddress),
|
|
@@ -124,7 +124,7 @@ export const TransactionPage = () => {
|
|
|
124
124
|
const getInsuranceCoverageId = () => route.steps[0].execution?.process
|
|
125
125
|
.filter((process) => process.type !== 'TOKEN_ALLOWANCE')
|
|
126
126
|
.find((process) => process.txHash)?.txHash ?? route.fromAddress;
|
|
127
|
-
return (_jsxs(Container, { children: [getStepList(route, subvariant), subvariant === 'nft' ? (_jsx(ContractComponent, { mt: 2, children: contractSecondaryComponent || contractComponent })) : null, insuranceAvailable ? (_jsx(Insurance, { mt: 2, status: status, insurableRouteId: stateRouteId, feeAmountUsd: route.insurance.feeAmountUsd, insuredAmount: formatTokenAmount(route.toAmountMin, route.toToken.decimals), insuredTokenSymbol: route.toToken.symbol, insuranceCoverageId: getInsuranceCoverageId(), onChange: setRouteId })) : null, status === RouteExecutionStatus.Idle ||
|
|
127
|
+
return (_jsxs(Container, { children: [getStepList(route, subvariant), subvariant === 'nft' ? (_jsx(ContractComponent, { mt: 2, children: contractSecondaryComponent || contractComponent })) : null, insuranceAvailable ? (_jsx(Insurance, { mt: 2, status: status, insurableRouteId: stateRouteId, feeAmountUsd: route.insurance.feeAmountUsd, insuredAmount: formatTokenAmount(BigInt(route.toAmountMin), route.toToken.decimals), insuredTokenSymbol: route.toToken.symbol, insuranceCoverageId: getInsuranceCoverageId(), onChange: setRouteId })) : null, status === RouteExecutionStatus.Idle ||
|
|
128
128
|
status === RouteExecutionStatus.Failed ? (_jsxs(_Fragment, { children: [_jsx(GasMessage, { mt: 2, route: route }), _jsxs(Box, { mt: 2, display: "flex", children: [_jsx(StartButton, { text: getButtonText(), onClick: handleStartClick, route: route, insurableRouteId: stateRouteId }), status === RouteExecutionStatus.Failed ? (_jsx(Tooltip, { title: t('button.removeTransaction'), placement: "bottom-end", enterDelay: 400, arrow: true, children: _jsx(Button, { onClick: handleRemoveRoute, sx: {
|
|
129
129
|
minWidth: 48,
|
|
130
130
|
marginLeft: 1,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { useFormContext } from 'react-hook-form';
|
|
4
4
|
import { FormKey } from '.';
|
|
5
|
-
import {
|
|
5
|
+
import { useAccount } from '../../hooks';
|
|
6
6
|
import { isItemAllowed, useWidgetConfig } from '../WidgetProvider';
|
|
7
7
|
export const FormUpdater = ({ defaultValues }) => {
|
|
8
8
|
const { fromChain, toChain, chains } = useWidgetConfig();
|
|
9
|
-
const { account } =
|
|
9
|
+
const { account } = useAccount();
|
|
10
10
|
const { setValue, getValues, getFieldState, resetField,
|
|
11
11
|
// Subscription to touchedFields is required by getFieldState to work
|
|
12
12
|
formState: { touchedFields }, } = useFormContext();
|
|
@@ -14,7 +14,7 @@ export const FormUpdater = ({ defaultValues }) => {
|
|
|
14
14
|
// Set wallet chain as default if no chains are provided by config and if they were not changed during widget usage
|
|
15
15
|
useEffect(() => {
|
|
16
16
|
const chainAllowed = account.chainId && isItemAllowed(account.chainId, chains);
|
|
17
|
-
if (!account.
|
|
17
|
+
if (!account.isConnected || !account.chainId || !chainAllowed) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
const { isTouched: isFromChainTouched } = getFieldState(FormKey.FromChain);
|
|
@@ -37,7 +37,7 @@ export const FormUpdater = ({ defaultValues }) => {
|
|
|
37
37
|
}
|
|
38
38
|
}, [
|
|
39
39
|
account.chainId,
|
|
40
|
-
account.
|
|
40
|
+
account.isConnected,
|
|
41
41
|
chains,
|
|
42
42
|
fromChain,
|
|
43
43
|
getFieldState,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import LanguageDetector from 'i18next-browser-languagedetector';
|
|
2
|
+
import { createInstance } from 'i18next';
|
|
4
3
|
import { useMemo } from 'react';
|
|
5
4
|
import { I18nextProvider, initReactI18next } from 'react-i18next';
|
|
6
5
|
import * as supportedLanguages from '../../i18n';
|
|
@@ -8,7 +7,7 @@ import { useSettings } from '../../stores';
|
|
|
8
7
|
import { deepMerge } from '../../utils';
|
|
9
8
|
import { isItemAllowed, useWidgetConfig } from '../WidgetProvider';
|
|
10
9
|
export const I18nProvider = ({ children, }) => {
|
|
11
|
-
const { languageResources, languages
|
|
10
|
+
const { languageResources, languages } = useWidgetConfig();
|
|
12
11
|
const { language } = useSettings(['language']);
|
|
13
12
|
const i18n = useMemo(() => {
|
|
14
13
|
let resources = Object.keys(supportedLanguages)
|
|
@@ -31,7 +30,7 @@ export const I18nProvider = ({ children, }) => {
|
|
|
31
30
|
return resources;
|
|
32
31
|
}, resources);
|
|
33
32
|
}
|
|
34
|
-
let i18n =
|
|
33
|
+
let i18n = createInstance({
|
|
35
34
|
lng: languages?.default || language,
|
|
36
35
|
fallbackLng: resources.en
|
|
37
36
|
? 'en'
|
|
@@ -47,11 +46,8 @@ export const I18nProvider = ({ children, }) => {
|
|
|
47
46
|
caches: [],
|
|
48
47
|
},
|
|
49
48
|
});
|
|
50
|
-
if (!language && !languages?.default && !disableLanguageDetector) {
|
|
51
|
-
i18n = i18n.use(LanguageDetector);
|
|
52
|
-
}
|
|
53
49
|
i18n.use(initReactI18next).init();
|
|
54
50
|
return i18n;
|
|
55
|
-
}, [
|
|
51
|
+
}, [language, languageResources, languages]);
|
|
56
52
|
return _jsx(I18nextProvider, { i18n: i18n, children: children });
|
|
57
53
|
};
|
|
@@ -3,13 +3,14 @@ export type PartialResource<T> = T extends object ? {
|
|
|
3
3
|
[P in keyof T]?: PartialResource<T[P]>;
|
|
4
4
|
} : T;
|
|
5
5
|
export type LanguageKey = keyof typeof languages;
|
|
6
|
+
export type LanguageResource = typeof languages.en;
|
|
6
7
|
export type LanguageResources = {
|
|
7
|
-
[language in LanguageKey]?: PartialResource<
|
|
8
|
+
[language in LanguageKey]?: PartialResource<LanguageResource>;
|
|
8
9
|
} | {
|
|
9
|
-
[language: string]: PartialResource<
|
|
10
|
+
[language: string]: PartialResource<LanguageResource>;
|
|
10
11
|
};
|
|
11
12
|
export type LanguageTranslationResource = {
|
|
12
|
-
[namespace in 'translation']: PartialResource<
|
|
13
|
+
[namespace in 'translation']: PartialResource<LanguageResource>;
|
|
13
14
|
};
|
|
14
15
|
export type LanguageTranslationResources = {
|
|
15
16
|
[language: string]: LanguageTranslationResource;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { alpha, binance, bitget, bitpie, block, brave, coinbase, dcent, exodus, frame, frontier, gate, hyperpay, imtoken, liquality, okx, oneinch, ownbit, rabby, safepal, status, taho, tokenary, tokenpocket, trust, walletConnect, xdefi, } from '@lifi/wallet-management';
|
|
3
|
+
import { useContext, useMemo } from 'react';
|
|
4
|
+
import { createClient } from 'viem';
|
|
5
|
+
import { WagmiContext, WagmiProvider, createConfig, http } from 'wagmi';
|
|
6
|
+
import { mainnet } from 'wagmi/chains';
|
|
7
|
+
import { useAvailableChains } from '../../hooks';
|
|
8
|
+
import { formatChain } from './utils';
|
|
9
|
+
const connectors = [
|
|
10
|
+
walletConnect,
|
|
11
|
+
coinbase,
|
|
12
|
+
bitget,
|
|
13
|
+
gate,
|
|
14
|
+
exodus,
|
|
15
|
+
taho,
|
|
16
|
+
binance,
|
|
17
|
+
frontier,
|
|
18
|
+
okx,
|
|
19
|
+
trust,
|
|
20
|
+
status,
|
|
21
|
+
alpha,
|
|
22
|
+
block,
|
|
23
|
+
bitpie,
|
|
24
|
+
brave,
|
|
25
|
+
dcent,
|
|
26
|
+
frame,
|
|
27
|
+
hyperpay,
|
|
28
|
+
imtoken,
|
|
29
|
+
liquality,
|
|
30
|
+
ownbit,
|
|
31
|
+
tokenpocket,
|
|
32
|
+
xdefi,
|
|
33
|
+
oneinch,
|
|
34
|
+
tokenary,
|
|
35
|
+
safepal,
|
|
36
|
+
rabby,
|
|
37
|
+
];
|
|
38
|
+
export const EVMProvider = ({ children }) => {
|
|
39
|
+
const inWagmiContext = useInWagmiContext();
|
|
40
|
+
return inWagmiContext ? (children) : (_jsx(EVMBaseProvider, { children: children }));
|
|
41
|
+
};
|
|
42
|
+
export const EVMBaseProvider = ({ children }) => {
|
|
43
|
+
const { chains } = useAvailableChains();
|
|
44
|
+
const wagmiConfig = useMemo(() => {
|
|
45
|
+
const _chains = chains?.length
|
|
46
|
+
? chains.map(formatChain)
|
|
47
|
+
: [mainnet];
|
|
48
|
+
// Add ENS contracts
|
|
49
|
+
const _mainnet = _chains.find((chain) => chain.id === mainnet.id);
|
|
50
|
+
if (_mainnet) {
|
|
51
|
+
_mainnet.contracts = mainnet.contracts;
|
|
52
|
+
}
|
|
53
|
+
const wagmiConfig = createConfig({
|
|
54
|
+
chains: _chains,
|
|
55
|
+
connectors: connectors,
|
|
56
|
+
client({ chain }) {
|
|
57
|
+
return createClient({ chain, transport: http() });
|
|
58
|
+
},
|
|
59
|
+
// transports: _chains.reduce(
|
|
60
|
+
// (transports, chain) => {
|
|
61
|
+
// transports[chain.id] = http();
|
|
62
|
+
// return transports;
|
|
63
|
+
// },
|
|
64
|
+
// {} as Record<number, Transport>,
|
|
65
|
+
// ),
|
|
66
|
+
});
|
|
67
|
+
return wagmiConfig;
|
|
68
|
+
}, [chains]);
|
|
69
|
+
return (_jsx(WagmiProvider, { config: wagmiConfig, reconnectOnMount: Boolean(chains?.length), children: children }));
|
|
70
|
+
};
|
|
71
|
+
function useInWagmiContext() {
|
|
72
|
+
const context = useContext(WagmiContext);
|
|
73
|
+
return Boolean(context);
|
|
74
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDKProviders: () => null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EVM, Solana, config } from '@lifi/sdk';
|
|
2
|
+
import { useWallet } from '@solana/wallet-adapter-react';
|
|
3
|
+
import { getWalletClient, switchChain } from '@wagmi/core';
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
|
+
import { useConfig } from 'wagmi';
|
|
6
|
+
export const SDKProviders = () => {
|
|
7
|
+
const { wallet } = useWallet();
|
|
8
|
+
const wagmiConfig = useConfig();
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
// Configure SDK Providers
|
|
11
|
+
config.setProviders([
|
|
12
|
+
EVM({
|
|
13
|
+
getWalletClient: () => getWalletClient(wagmiConfig),
|
|
14
|
+
switchChain: async (chainId) => {
|
|
15
|
+
await switchChain(wagmiConfig, { chainId });
|
|
16
|
+
return getWalletClient(wagmiConfig);
|
|
17
|
+
},
|
|
18
|
+
}),
|
|
19
|
+
Solana({
|
|
20
|
+
async getWalletAdapter() {
|
|
21
|
+
return wallet?.adapter;
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
]);
|
|
25
|
+
}, [wagmiConfig, wallet?.adapter]);
|
|
26
|
+
return null;
|
|
27
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
|
|
3
|
+
import { ConnectionContext, ConnectionProvider, WalletProvider, } from '@solana/wallet-adapter-react';
|
|
4
|
+
import { clusterApiUrl } from '@solana/web3.js';
|
|
5
|
+
import { useContext } from 'react';
|
|
6
|
+
const endpoint = clusterApiUrl(WalletAdapterNetwork.Mainnet);
|
|
7
|
+
/**
|
|
8
|
+
* Wallets that implement either of these standards will be available automatically.
|
|
9
|
+
*
|
|
10
|
+
* - Solana Mobile Stack Mobile Wallet Adapter Protocol
|
|
11
|
+
* (https://github.com/solana-mobile/mobile-wallet-adapter)
|
|
12
|
+
* - Solana Wallet Standard
|
|
13
|
+
* (https://github.com/solana-labs/wallet-standard)
|
|
14
|
+
*
|
|
15
|
+
* If you wish to support a wallet that supports neither of those standards,
|
|
16
|
+
* instantiate its legacy wallet adapter here. Common legacy adapters can be found
|
|
17
|
+
* in the npm package `@solana/wallet-adapter-wallets`.
|
|
18
|
+
*/
|
|
19
|
+
const wallets = [];
|
|
20
|
+
export const SolanaProvider = ({ children }) => {
|
|
21
|
+
const inSolanaContext = useInSolanaContext();
|
|
22
|
+
return inSolanaContext ? (children) : (_jsx(SolanaBaseProvider, { children: children }));
|
|
23
|
+
};
|
|
24
|
+
export const SolanaBaseProvider = ({ children }) => {
|
|
25
|
+
return (_jsx(ConnectionProvider, { endpoint: endpoint, children: _jsx(WalletProvider, { wallets: wallets, autoConnect: true, children: children }) }));
|
|
26
|
+
};
|
|
27
|
+
function useInSolanaContext() {
|
|
28
|
+
const context = useContext(ConnectionContext);
|
|
29
|
+
return Boolean(context?.connection);
|
|
30
|
+
}
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { FC, PropsWithChildren } from 'react';
|
|
3
|
-
import type { WalletContextProps } from './types';
|
|
4
|
-
export declare const useWallet: () => WalletContextProps;
|
|
1
|
+
import { type FC, type PropsWithChildren } from 'react';
|
|
5
2
|
export declare const WalletProvider: FC<PropsWithChildren>;
|
|
6
|
-
export declare const extractAccountFromSigner: (signer?: Signer) => Promise<{
|
|
7
|
-
address: string | undefined;
|
|
8
|
-
isActive: boolean;
|
|
9
|
-
signer: Signer | undefined;
|
|
10
|
-
chainId: number | undefined;
|
|
11
|
-
} | {
|
|
12
|
-
address?: undefined;
|
|
13
|
-
isActive?: undefined;
|
|
14
|
-
signer?: undefined;
|
|
15
|
-
chainId?: undefined;
|
|
16
|
-
}>;
|