0xtrails 0.6.6 → 0.7.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/dist/aave.d.ts +10 -2
- package/dist/aave.d.ts.map +1 -1
- package/dist/analytics.d.ts +26 -0
- package/dist/analytics.d.ts.map +1 -1
- package/dist/{ccip-CbJrlK-L.js → ccip-fConRNoG.js} +21 -21
- package/dist/chains.d.ts +23 -8
- package/dist/chains.d.ts.map +1 -1
- package/dist/constants.d.ts +5 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/customTokens.d.ts +12 -0
- package/dist/customTokens.d.ts.map +1 -0
- package/dist/decoders.d.ts +2 -2
- package/dist/decoders.d.ts.map +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/fees.d.ts +37 -2
- package/dist/fees.d.ts.map +1 -1
- package/dist/gasless.d.ts +15 -36
- package/dist/gasless.d.ts.map +1 -1
- package/dist/{index-w7_dK4c5.js → index-BbajxCG_.js} +59269 -77146
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +828 -359
- package/dist/indexerClient.d.ts.map +1 -1
- package/dist/intentReceiptMonitor.d.ts +1 -1
- package/dist/intentReceiptMonitor.d.ts.map +1 -1
- package/dist/intentReceiptPoller.d.ts +1 -1
- package/dist/intentReceiptPoller.d.ts.map +1 -1
- package/dist/intents.d.ts +3 -2
- package/dist/intents.d.ts.map +1 -1
- package/dist/mode.d.ts +1 -1
- package/dist/mode.d.ts.map +1 -1
- package/dist/mutations.d.ts +2 -2
- package/dist/mutations.d.ts.map +1 -1
- package/dist/prepareSend.d.ts +2 -2
- package/dist/prepareSend.d.ts.map +1 -1
- package/dist/prices.d.ts +1 -1
- package/dist/prices.d.ts.map +1 -1
- package/dist/sequenceWallet.d.ts +2 -2
- package/dist/sequenceWallet.d.ts.map +1 -1
- package/dist/time.d.ts +6 -0
- package/dist/time.d.ts.map +1 -1
- package/dist/tokenBalances.d.ts +40 -25
- package/dist/tokenBalances.d.ts.map +1 -1
- package/dist/tokens.d.ts +54 -14
- package/dist/tokens.d.ts.map +1 -1
- package/dist/trailsClient.d.ts +1 -1
- package/dist/trailsClient.d.ts.map +1 -1
- package/dist/trailsRouter.d.ts +2 -1
- package/dist/trailsRouter.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts +3 -2
- package/dist/transactionIntent/deposits/depositOrchestrator.d.ts.map +1 -1
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts +2 -1
- package/dist/transactionIntent/deposits/gaslessDeposit.d.ts.map +1 -1
- package/dist/transactionIntent/execution/transactionState.d.ts +1 -1
- package/dist/transactionIntent/execution/transactionState.d.ts.map +1 -1
- package/dist/transactionIntent/handlers/crossChain.d.ts +5 -3
- package/dist/transactionIntent/handlers/crossChain.d.ts.map +1 -1
- package/dist/transactionIntent/handlers/sameChainSameToken.d.ts +5 -3
- package/dist/transactionIntent/handlers/sameChainSameToken.d.ts.map +1 -1
- package/dist/transactionIntent/quote/feeExtractors.d.ts +1 -6
- package/dist/transactionIntent/quote/feeExtractors.d.ts.map +1 -1
- package/dist/transactionIntent/quote/normalizeQuote.d.ts +4 -2
- package/dist/transactionIntent/quote/normalizeQuote.d.ts.map +1 -1
- package/dist/transactionIntent/quote/quoteHelpers.d.ts +1 -1
- package/dist/transactionIntent/quote/quoteHelpers.d.ts.map +1 -1
- package/dist/transactionIntent/types.d.ts +28 -5
- package/dist/transactionIntent/types.d.ts.map +1 -1
- package/dist/transactionIntent/utils/testnetHelpers.d.ts +0 -1
- package/dist/transactionIntent/utils/testnetHelpers.d.ts.map +1 -1
- package/dist/transactionIntent/validators.d.ts +0 -2
- package/dist/transactionIntent/validators.d.ts.map +1 -1
- package/dist/transactions.d.ts +2 -2
- package/dist/transactions.d.ts.map +1 -1
- package/dist/utils.d.ts +7 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/wallets.d.ts +1 -0
- package/dist/wallets.d.ts.map +1 -1
- package/dist/widget/components/AccountIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/components/AddressWalletIcon.d.ts +6 -0
- package/dist/widget/components/AddressWalletIcon.d.ts.map +1 -0
- package/dist/widget/components/ChainFilterDropdown.d.ts +2 -6
- package/dist/widget/components/ChainFilterDropdown.d.ts.map +1 -1
- package/dist/widget/components/ChainImage.d.ts.map +1 -1
- package/dist/widget/components/ChainList.d.ts +0 -5
- package/dist/widget/components/ChainList.d.ts.map +1 -1
- package/dist/widget/components/ClassicSwap.d.ts +6 -6
- package/dist/widget/components/ClassicSwap.d.ts.map +1 -1
- package/dist/widget/components/ConnectWallet.d.ts.map +1 -1
- package/dist/widget/components/ConnectedWallets.d.ts.map +1 -1
- package/dist/widget/components/DebugMenu.d.ts +1 -1
- package/dist/widget/components/DebugMenu.d.ts.map +1 -1
- package/dist/widget/components/DebugScreensList.d.ts.map +1 -1
- package/dist/widget/components/DepositTracker.d.ts.map +1 -1
- package/dist/widget/components/Earn.d.ts +5 -5
- package/dist/widget/components/Earn.d.ts.map +1 -1
- package/dist/widget/components/FeeOption.d.ts +1 -1
- package/dist/widget/components/FeeOption.d.ts.map +1 -1
- package/dist/widget/components/FeeOptions.d.ts +2 -2
- package/dist/widget/components/FeeOptions.d.ts.map +1 -1
- package/dist/widget/components/Footer.d.ts +1 -1
- package/dist/widget/components/Footer.d.ts.map +1 -1
- package/dist/widget/components/Fund.d.ts +5 -5
- package/dist/widget/components/Fund.d.ts.map +1 -1
- package/dist/widget/components/FundMethods.d.ts +0 -1
- package/dist/widget/components/FundMethods.d.ts.map +1 -1
- package/dist/widget/components/FundSwap.d.ts +6 -6
- package/dist/widget/components/FundSwap.d.ts.map +1 -1
- package/dist/widget/components/HookModalContent.d.ts +8 -0
- package/dist/widget/components/HookModalContent.d.ts.map +1 -0
- package/dist/widget/components/OriginSelectionAmount.d.ts +11 -0
- package/dist/widget/components/OriginSelectionAmount.d.ts.map +1 -0
- package/dist/widget/components/Pay.d.ts +5 -5
- package/dist/widget/components/Pay.d.ts.map +1 -1
- package/dist/widget/components/PoolDeposit.d.ts +5 -5
- package/dist/widget/components/PoolDeposit.d.ts.map +1 -1
- package/dist/widget/components/PoolWithdraw.d.ts +3 -3
- package/dist/widget/components/PoolWithdraw.d.ts.map +1 -1
- package/dist/widget/components/QuoteDetails.d.ts.map +1 -1
- package/dist/widget/components/Receipt.d.ts +2 -1
- package/dist/widget/components/Receipt.d.ts.map +1 -1
- package/dist/widget/components/RecentTokens.d.ts +4 -4
- package/dist/widget/components/RecentTokens.d.ts.map +1 -1
- package/dist/widget/components/RecipientSelectorButton.d.ts.map +1 -1
- package/dist/widget/components/ShadowPortal.d.ts +6 -0
- package/dist/widget/components/ShadowPortal.d.ts.map +1 -0
- package/dist/widget/components/Swap.d.ts +6 -6
- package/dist/widget/components/Swap.d.ts.map +1 -1
- package/dist/widget/components/ThemeProvider.d.ts +1 -1
- package/dist/widget/components/ThemeProvider.d.ts.map +1 -1
- package/dist/widget/components/TokenList.d.ts +3 -4
- package/dist/widget/components/TokenList.d.ts.map +1 -1
- package/dist/widget/components/TokenSelector.d.ts +3 -4
- package/dist/widget/components/TokenSelector.d.ts.map +1 -1
- package/dist/widget/components/Tooltip.d.ts +6 -1
- package/dist/widget/components/Tooltip.d.ts.map +1 -1
- package/dist/widget/components/TrailsHookModal.d.ts +10 -0
- package/dist/widget/components/TrailsHookModal.d.ts.map +1 -0
- package/dist/widget/components/WaasFeeOptions.d.ts +3 -0
- package/dist/widget/components/WaasFeeOptions.d.ts.map +1 -1
- package/dist/widget/components/WalletConfirmation.d.ts.map +1 -1
- package/dist/widget/components/WalletConnect.d.ts.map +1 -1
- package/dist/widget/components/WidgetProviders.d.ts +14 -0
- package/dist/widget/components/WidgetProviders.d.ts.map +1 -0
- package/dist/widget/css/compiled.css +1 -1
- package/dist/widget/hooks/useAddressWalletIcon.d.ts +10 -0
- package/dist/widget/hooks/useAddressWalletIcon.d.ts.map +1 -0
- package/dist/widget/hooks/useBalanceVisible.d.ts +1 -1
- package/dist/widget/hooks/useBalanceVisible.d.ts.map +1 -1
- package/dist/widget/hooks/useChainFilter.d.ts +1 -1
- package/dist/widget/hooks/useChainFilter.d.ts.map +1 -1
- package/dist/widget/hooks/useCheckout.d.ts +13 -1
- package/dist/widget/hooks/useCheckout.d.ts.map +1 -1
- package/dist/widget/hooks/useConnector.d.ts +4 -0
- package/dist/widget/hooks/useConnector.d.ts.map +1 -0
- package/dist/widget/hooks/useCurrentScreen.d.ts +1 -1
- package/dist/widget/hooks/useCurrentScreen.d.ts.map +1 -1
- package/dist/widget/hooks/useCustomTokenFetch.d.ts +19 -0
- package/dist/widget/hooks/useCustomTokenFetch.d.ts.map +1 -0
- package/dist/widget/hooks/useCustomTokenSearch.d.ts +20 -0
- package/dist/widget/hooks/useCustomTokenSearch.d.ts.map +1 -0
- package/dist/widget/hooks/useDebounce.d.ts +10 -0
- package/dist/widget/hooks/useDebounce.d.ts.map +1 -0
- package/dist/widget/hooks/useDebugScreens.d.ts +7 -2
- package/dist/widget/hooks/useDebugScreens.d.ts.map +1 -1
- package/dist/widget/hooks/useDefaultTokenSelection.d.ts +3 -19
- package/dist/widget/hooks/useDefaultTokenSelection.d.ts.map +1 -1
- package/dist/widget/hooks/useDestinationSelectedToken.d.ts +1 -14
- package/dist/widget/hooks/useDestinationSelectedToken.d.ts.map +1 -1
- package/dist/widget/hooks/useEarnPool.d.ts +1 -1
- package/dist/widget/hooks/useEarnPool.d.ts.map +1 -1
- package/dist/widget/hooks/useIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/hooks/useIsMobile.d.ts +5 -0
- package/dist/widget/hooks/useIsMobile.d.ts.map +1 -0
- package/dist/widget/hooks/useMode.d.ts +2 -2
- package/dist/widget/hooks/useMode.d.ts.map +1 -1
- package/dist/widget/hooks/useOriginSelectedToken.d.ts +2 -15
- package/dist/widget/hooks/useOriginSelectedToken.d.ts.map +1 -1
- package/dist/widget/hooks/usePayMessage.d.ts.map +1 -1
- package/dist/widget/hooks/usePriceImpactWarning.d.ts +1 -1
- package/dist/widget/hooks/usePriceImpactWarning.d.ts.map +1 -1
- package/dist/widget/hooks/useQuote.d.ts +173 -4
- package/dist/widget/hooks/useQuote.d.ts.map +1 -1
- package/dist/widget/hooks/useRecentTokens.d.ts +3 -3
- package/dist/widget/hooks/useRecentTokens.d.ts.map +1 -1
- package/dist/widget/hooks/useRecipients.d.ts +1 -1
- package/dist/widget/hooks/useRecipients.d.ts.map +1 -1
- package/dist/widget/hooks/useSelectedFeeOption.d.ts +2 -2
- package/dist/widget/hooks/useSelectedFeeOption.d.ts.map +1 -1
- package/dist/widget/hooks/useSelectedFundMethod.d.ts +1 -1
- package/dist/widget/hooks/useSelectedFundMethod.d.ts.map +1 -1
- package/dist/widget/hooks/useSelectedRecipient.d.ts +1 -1
- package/dist/widget/hooks/useSelectedRecipient.d.ts.map +1 -1
- package/dist/widget/hooks/useSendForm.d.ts +9 -31
- package/dist/widget/hooks/useSendForm.d.ts.map +1 -1
- package/dist/widget/hooks/useSwapAmount.d.ts +1 -1
- package/dist/widget/hooks/useSwapAmount.d.ts.map +1 -1
- package/dist/widget/hooks/useTheme.d.ts +1 -1
- package/dist/widget/hooks/useTheme.d.ts.map +1 -1
- package/dist/widget/hooks/useTokenList.d.ts +7 -31
- package/dist/widget/hooks/useTokenList.d.ts.map +1 -1
- package/dist/widget/hooks/useTrailsSendTransaction.d.ts +83 -0
- package/dist/widget/hooks/useTrailsSendTransaction.d.ts.map +1 -0
- package/dist/widget/hooks/useWalletConnectUri.d.ts +11 -0
- package/dist/widget/hooks/useWalletConnectUri.d.ts.map +1 -0
- package/dist/widget/hooks/useWidgetProps.d.ts +5 -0
- package/dist/widget/hooks/useWidgetProps.d.ts.map +1 -1
- package/dist/widget/index.d.ts +2 -0
- package/dist/widget/index.d.ts.map +1 -1
- package/dist/widget/index.js +8 -5
- package/dist/widget/providers/TrailsModalProvider.d.ts +65 -0
- package/dist/widget/providers/TrailsModalProvider.d.ts.map +1 -0
- package/dist/widget/providers/TrailsProvider.d.ts +1 -1
- package/dist/widget/providers/TrailsProvider.d.ts.map +1 -1
- package/dist/widget/types.d.ts +11 -18
- package/dist/widget/types.d.ts.map +1 -1
- package/dist/widget/widget.d.ts +20 -11
- package/dist/widget/widget.d.ts.map +1 -1
- package/package.json +45 -49
- package/src/aave.ts +387 -138
- package/src/analytics.ts +208 -2
- package/src/chains.ts +65 -64
- package/src/constants.ts +18 -14
- package/src/customTokens.ts +151 -0
- package/src/decoders.ts +4 -7
- package/src/error.ts +7 -3
- package/src/fees.ts +239 -125
- package/src/gasless.ts +54 -108
- package/src/index.ts +29 -9
- package/src/indexerClient.ts +2 -0
- package/src/intentReceiptMonitor.ts +1 -4
- package/src/intentReceiptPoller.ts +2 -2
- package/src/intents.ts +16 -5
- package/src/mode.ts +1 -1
- package/src/mutations.ts +7 -3
- package/src/prepareSend.ts +19 -14
- package/src/prices.ts +1 -1
- package/src/sequenceWallet.ts +2 -2
- package/src/time.ts +28 -0
- package/src/tokenBalances.ts +348 -153
- package/src/tokens.ts +393 -142
- package/src/trailsClient.ts +1 -1
- package/src/trailsRouter.ts +4 -5
- package/src/transactionIntent/deposits/depositOrchestrator.ts +6 -2
- package/src/transactionIntent/deposits/gaslessDeposit.ts +13 -7
- package/src/transactionIntent/deposits/standardDeposit.ts +1 -1
- package/src/transactionIntent/execution/transactionState.ts +1 -1
- package/src/transactionIntent/handlers/crossChain.ts +75 -37
- package/src/transactionIntent/handlers/sameChainSameToken.ts +66 -20
- package/src/transactionIntent/quote/feeExtractors.ts +1 -29
- package/src/transactionIntent/quote/normalizeQuote.ts +99 -7
- package/src/transactionIntent/quote/quoteHelpers.ts +1 -1
- package/src/transactionIntent/types.ts +31 -6
- package/src/transactionIntent/utils/testnetHelpers.ts +0 -5
- package/src/transactionIntent/validators.ts +0 -30
- package/src/transactions.ts +3 -3
- package/src/utils.ts +18 -0
- package/src/wallets.ts +32 -10
- package/src/widget/compiled.css +1 -1
- package/src/widget/components/AccountIntentTransactionHistory.tsx +2 -1
- package/src/widget/components/AccountIntentTransactionHistoryButton.tsx +2 -2
- package/src/widget/components/AddressWalletIcon.tsx +29 -0
- package/src/widget/components/ChainFilterDropdown.tsx +2 -8
- package/src/widget/components/ChainImage.tsx +8 -5
- package/src/widget/components/ChainList.tsx +6 -8
- package/src/widget/components/ClassicSwap.tsx +93 -85
- package/src/widget/components/ConnectWallet.tsx +1 -2
- package/src/widget/components/ConnectedWallets.tsx +17 -4
- package/src/widget/components/DebugMenu.tsx +2 -2
- package/src/widget/components/DebugScreensList.tsx +0 -1
- package/src/widget/components/DepositTracker.tsx +20 -34
- package/src/widget/components/Earn.tsx +7 -6
- package/src/widget/components/FeeOption.tsx +4 -4
- package/src/widget/components/FeeOptions.tsx +19 -39
- package/src/widget/components/Footer.tsx +1 -1
- package/src/widget/components/Fund.tsx +23 -119
- package/src/widget/components/FundMethods.tsx +9 -6
- package/src/widget/components/FundSwap.tsx +6 -5
- package/src/widget/components/FundingMethodSelectorButton.tsx +2 -2
- package/src/widget/components/HookModalContent.tsx +306 -0
- package/src/widget/components/Modal.tsx +1 -1
- package/src/widget/components/OriginSelectionAmount.tsx +135 -0
- package/src/widget/components/Pay.tsx +66 -124
- package/src/widget/components/PoolDeposit.tsx +11 -55
- package/src/widget/components/PoolWithdraw.tsx +3 -3
- package/src/widget/components/QuoteDetails.tsx +473 -728
- package/src/widget/components/Receipt.tsx +74 -7
- package/src/widget/components/RecentTokens.tsx +8 -8
- package/src/widget/components/RecipientSelectorButton.tsx +4 -2
- package/src/widget/components/ScreenHeader.tsx +2 -2
- package/src/widget/components/SearchInputField.tsx +1 -1
- package/src/widget/components/ShadowPortal.tsx +58 -0
- package/src/widget/components/Swap.tsx +6 -5
- package/src/widget/components/ThemeProvider.tsx +1 -1
- package/src/widget/components/TokenList.tsx +3 -4
- package/src/widget/components/TokenSelector.tsx +211 -80
- package/src/widget/components/Tooltip.tsx +18 -7
- package/src/widget/components/TrailsHookModal.tsx +118 -0
- package/src/widget/components/WaasFeeOptions.tsx +333 -138
- package/src/widget/components/WalletConfirmation.tsx +7 -2
- package/src/widget/components/WalletConnect.tsx +197 -235
- package/src/widget/components/WidgetProviders.tsx +75 -0
- package/src/widget/hooks/useAddressWalletIcon.ts +53 -0
- package/src/widget/hooks/useBalanceVisible.tsx +1 -1
- package/src/widget/hooks/useChainFilter.tsx +1 -1
- package/src/widget/hooks/useCheckout.ts +13 -1
- package/src/widget/hooks/useConnector.tsx +18 -0
- package/src/widget/hooks/useCurrentScreen.tsx +3 -3
- package/src/widget/hooks/useCustomTokenFetch.tsx +72 -0
- package/src/widget/hooks/useCustomTokenSearch.tsx +402 -0
- package/src/widget/hooks/useDebounce.ts +25 -0
- package/src/widget/hooks/useDebugScreens.ts +26 -10
- package/src/widget/hooks/useDefaultTokenSelection.tsx +99 -143
- package/src/widget/hooks/useDestinationSelectedToken.tsx +1 -14
- package/src/widget/hooks/useEarnPool.tsx +1 -1
- package/src/widget/hooks/useIntentTransactionHistory.ts +20 -11
- package/src/widget/hooks/useIsMobile.tsx +50 -0
- package/src/widget/hooks/useMode.ts +2 -3
- package/src/widget/hooks/useOriginSelectedToken.tsx +2 -15
- package/src/widget/hooks/usePayMessage.tsx +31 -11
- package/src/widget/hooks/usePriceImpactWarning.ts +1 -1
- package/src/widget/hooks/useQuote.ts +189 -6
- package/src/widget/hooks/useRecentTokens.ts +6 -6
- package/src/widget/hooks/useRecipients.ts +1 -1
- package/src/widget/hooks/useSelectedFeeOption.tsx +2 -2
- package/src/widget/hooks/useSelectedFundMethod.tsx +1 -1
- package/src/widget/hooks/useSelectedRecipient.tsx +1 -1
- package/src/widget/hooks/useSendForm.ts +328 -152
- package/src/widget/hooks/useSwapAmount.tsx +1 -1
- package/src/widget/hooks/useTheme.tsx +1 -1
- package/src/widget/hooks/useTokenList.ts +672 -400
- package/src/widget/hooks/useTrailsSendTransaction.ts +949 -0
- package/src/widget/hooks/useWalletConnectUri.tsx +228 -0
- package/src/widget/hooks/useWidgetProps.tsx +3 -1
- package/src/widget/index.tsx +12 -0
- package/src/widget/providers/TrailsModalProvider.tsx +195 -0
- package/src/widget/providers/TrailsProvider.tsx +9 -3
- package/src/widget/types.ts +12 -20
- package/src/widget/widget.tsx +598 -385
- package/dist/cctp.d.ts +0 -3
- package/dist/cctp.d.ts.map +0 -1
- package/dist/lifi.d.ts +0 -4
- package/dist/lifi.d.ts.map +0 -1
- package/dist/meshconnect.d.ts +0 -171
- package/dist/meshconnect.d.ts.map +0 -1
- package/dist/relaySdk.d.ts +0 -87
- package/dist/relaySdk.d.ts.map +0 -1
- package/dist/widget/components/MeshConnectExchanges.d.ts +0 -7
- package/dist/widget/components/MeshConnectExchanges.d.ts.map +0 -1
- package/dist/widget/components/MeshConnectFlow.d.ts +0 -13
- package/dist/widget/components/MeshConnectFlow.d.ts.map +0 -1
- package/dist/widget/components/MeshConnectIframe.d.ts +0 -15
- package/dist/widget/components/MeshConnectIframe.d.ts.map +0 -1
- package/dist/widget/components/Receive.d.ts +0 -12
- package/dist/widget/components/Receive.d.ts.map +0 -1
- package/dist/widget/hooks/useSelectedMeshExchange.d.ts +0 -14
- package/dist/widget/hooks/useSelectedMeshExchange.d.ts.map +0 -1
- package/src/cctp.ts +0 -54
- package/src/lifi.ts +0 -108
- package/src/meshconnect.ts +0 -531
- package/src/relaySdk.ts +0 -703
- package/src/widget/components/MeshConnectExchanges.tsx +0 -290
- package/src/widget/components/MeshConnectFlow.tsx +0 -90
- package/src/widget/components/MeshConnectIframe.tsx +0 -500
- package/src/widget/components/Receive.tsx +0 -175
- package/src/widget/hooks/useSelectedMeshExchange.tsx +0 -46
|
@@ -5,13 +5,13 @@ import { TokenImage } from "./TokenImage.js"
|
|
|
5
5
|
import { useSelectedFundMethod } from "../hooks/useSelectedFundMethod.js"
|
|
6
6
|
import type { ProcessedFeeOption } from "../hooks/useSelectedFeeOption.js"
|
|
7
7
|
import { logger } from "../../logger.js"
|
|
8
|
-
import type { FeeOption } from "@
|
|
8
|
+
import type { FeeOption } from "@0xtrails/api"
|
|
9
9
|
import {
|
|
10
10
|
FeeOption as FeeOptionComponent,
|
|
11
11
|
isFeeOptionDisabled,
|
|
12
12
|
} from "./FeeOption.js"
|
|
13
13
|
import { isNativeToken, normalizeAddress } from "../../utils.js"
|
|
14
|
-
import type { Token } from "
|
|
14
|
+
import type { Token } from "../../tokens.js"
|
|
15
15
|
|
|
16
16
|
interface FeeOptionsProps {
|
|
17
17
|
processedFeeOptions: ProcessedFeeOption[]
|
|
@@ -148,19 +148,10 @@ export const FeeOptions: React.FC<FeeOptionsProps> = ({
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
return (
|
|
151
|
-
<div
|
|
151
|
+
<div ref={accordionRef}>
|
|
152
152
|
<div className="p-2">
|
|
153
|
-
<div className="flex justify-between items-center mb-2">
|
|
154
|
-
<div className="text-xs font-medium trails-text-primary">
|
|
155
|
-
Gas Fee Options
|
|
156
|
-
</div>
|
|
157
|
-
<div className="text-xs trails-text-muted">
|
|
158
|
-
Choose how to pay for gas for transfer
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
161
|
-
|
|
162
|
-
{/* Accordion Header */}
|
|
163
153
|
<button
|
|
154
|
+
className="w-full flex justify-between items-center mb-2 cursor-pointer"
|
|
164
155
|
type="button"
|
|
165
156
|
onClick={
|
|
166
157
|
processedFeeOptions.length === 1
|
|
@@ -168,40 +159,27 @@ export const FeeOptions: React.FC<FeeOptionsProps> = ({
|
|
|
168
159
|
: () => setIsOpen(!isOpen)
|
|
169
160
|
}
|
|
170
161
|
disabled={processedFeeOptions.length === 1}
|
|
171
|
-
className={`w-full flex items-center justify-between p-1.5 trails-border-radius-input border trails-border-primary transition-colors ${
|
|
172
|
-
processedFeeOptions.length === 1
|
|
173
|
-
? "cursor-default"
|
|
174
|
-
: "hover:trails-hover-bg cursor-pointer"
|
|
175
|
-
}`}
|
|
176
162
|
>
|
|
177
|
-
<div className="
|
|
163
|
+
<div className="text-sm font-semibold text-900 dark:text-white">
|
|
164
|
+
Gas Fee Options
|
|
165
|
+
</div>
|
|
166
|
+
<div className="flex items-center gap-1">
|
|
178
167
|
{displayOption && (
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
/>
|
|
186
|
-
<div className="ml-2 text-left">
|
|
187
|
-
<div className="text-xs font-medium trails-text-primary">
|
|
188
|
-
{displayOption.amountFormatted}
|
|
189
|
-
</div>
|
|
190
|
-
</div>
|
|
191
|
-
</>
|
|
168
|
+
<TokenImage
|
|
169
|
+
imageUrl={displayOption.tokenImageUrl}
|
|
170
|
+
symbol={displayOption.tokenSymbol}
|
|
171
|
+
chainId={displayOption.chainId || chainId}
|
|
172
|
+
size={16}
|
|
173
|
+
/>
|
|
192
174
|
)}
|
|
193
|
-
</div>
|
|
194
|
-
<div className="flex items-center space-x-2">
|
|
195
175
|
{displayOption && (
|
|
196
|
-
<div className="text-
|
|
197
|
-
|
|
198
|
-
≈ {displayOption.amountUsdDisplay}
|
|
199
|
-
</div>
|
|
176
|
+
<div className="text-sm font-medium text-gray-600 dark:text-gray-400">
|
|
177
|
+
{displayOption.amountUsdDisplay}
|
|
200
178
|
</div>
|
|
201
179
|
)}
|
|
202
180
|
{processedFeeOptions.length > 1 && (
|
|
203
181
|
<ChevronDown
|
|
204
|
-
className={`w-3 h-3
|
|
182
|
+
className={`w-3 h-3 transition-transform text-gray-600 dark:text-gray-400 ${
|
|
205
183
|
isOpen ? "transform rotate-180" : ""
|
|
206
184
|
}`}
|
|
207
185
|
/>
|
|
@@ -209,6 +187,8 @@ export const FeeOptions: React.FC<FeeOptionsProps> = ({
|
|
|
209
187
|
</div>
|
|
210
188
|
</button>
|
|
211
189
|
|
|
190
|
+
{/* Accordion Header */}
|
|
191
|
+
|
|
212
192
|
{/* Accordion Content */}
|
|
213
193
|
{isOpen && processedFeeOptions.length > 1 && (
|
|
214
194
|
<div className="mt-2 space-y-1">
|
|
@@ -6,7 +6,7 @@ import { SITE_URL } from "../../constants.js"
|
|
|
6
6
|
import { DebugMenu } from "./DebugMenu.js"
|
|
7
7
|
|
|
8
8
|
interface FooterProps {
|
|
9
|
-
onDebugScreenSelect
|
|
9
|
+
onDebugScreenSelect?: (screen: string) => void
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const Footer: React.FC<FooterProps> = ({ onDebugScreenSelect }) => {
|
|
@@ -2,7 +2,6 @@ import { ChevronRight, Search, Loader2, ArrowDown } from "lucide-react"
|
|
|
2
2
|
import { useEffect, useState, useMemo, useRef, useCallback } from "react"
|
|
3
3
|
import type React from "react"
|
|
4
4
|
import type { Account, WalletClient } from "viem"
|
|
5
|
-
import { zeroAddress } from "viem"
|
|
6
5
|
import type { TransactionState } from "../../transactions.js"
|
|
7
6
|
import type { OnCompleteProps } from "../hooks/useSendForm.js"
|
|
8
7
|
import type { CheckoutOnHandlers } from "../hooks/useCheckout.js"
|
|
@@ -27,7 +26,7 @@ import { ErrorDisplay } from "./ErrorDisplay.js"
|
|
|
27
26
|
import { getChainInfo } from "../../chains.js"
|
|
28
27
|
import { truncateAddress } from "../../utils.js"
|
|
29
28
|
import type { PrepareSendQuote } from "../../prepareSend.js"
|
|
30
|
-
import type {
|
|
29
|
+
import type { Token } from "../../tokens.js"
|
|
31
30
|
import { logger } from "../../logger.js"
|
|
32
31
|
import { RefundWarning } from "./RefundWarning.js"
|
|
33
32
|
import { PercentageMaxButtons } from "./PercentageMaxButtons.js"
|
|
@@ -49,7 +48,7 @@ interface FundProps {
|
|
|
49
48
|
setWalletConfirmRetryHandler: (handler: () => Promise<void>) => void
|
|
50
49
|
quoteProvider?: string
|
|
51
50
|
fundMethod?: string
|
|
52
|
-
|
|
51
|
+
onNavigateToOnramp?: (
|
|
53
52
|
props: {
|
|
54
53
|
toTokenSymbol: string
|
|
55
54
|
toTokenAmount: string
|
|
@@ -57,10 +56,11 @@ interface FundProps {
|
|
|
57
56
|
toRecipientAddress: string
|
|
58
57
|
},
|
|
59
58
|
quote?: PrepareSendQuote | null,
|
|
59
|
+
continueSend?: () => Promise<void>,
|
|
60
60
|
) => void
|
|
61
61
|
checkoutOnHandlers?: CheckoutOnHandlers
|
|
62
|
-
recentTokens?:
|
|
63
|
-
onRecentTokenSelect?: (token:
|
|
62
|
+
recentTokens?: Token[]
|
|
63
|
+
onRecentTokenSelect?: (token: Token) => void
|
|
64
64
|
onTrackToken?: (token: any) => void
|
|
65
65
|
toRecipient?: string
|
|
66
66
|
toAmount?: string
|
|
@@ -84,7 +84,7 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
84
84
|
setWalletConfirmRetryHandler,
|
|
85
85
|
quoteProvider,
|
|
86
86
|
fundMethod,
|
|
87
|
-
|
|
87
|
+
onNavigateToOnramp,
|
|
88
88
|
checkoutOnHandlers,
|
|
89
89
|
recentTokens,
|
|
90
90
|
onRecentTokenSelect,
|
|
@@ -167,7 +167,7 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
167
167
|
quoteProvider,
|
|
168
168
|
fundMethod,
|
|
169
169
|
mode,
|
|
170
|
-
|
|
170
|
+
onNavigateToOnramp,
|
|
171
171
|
checkoutOnHandlers,
|
|
172
172
|
})
|
|
173
173
|
|
|
@@ -196,17 +196,8 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
196
196
|
defaultDestinationToken,
|
|
197
197
|
)
|
|
198
198
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
(defaultDestinationToken as any)?.decimals
|
|
202
|
-
|
|
203
|
-
setDestinationToken(defaultDestinationToken as any)
|
|
204
|
-
setSelectedDestToken({
|
|
205
|
-
symbol: defaultDestinationToken.symbol,
|
|
206
|
-
name: defaultDestinationToken.name,
|
|
207
|
-
imageUrl: defaultDestinationToken.imageUrl,
|
|
208
|
-
decimals,
|
|
209
|
-
})
|
|
199
|
+
setDestinationToken(defaultDestinationToken)
|
|
200
|
+
setSelectedDestToken(defaultDestinationToken)
|
|
210
201
|
|
|
211
202
|
// Also set the destination chain
|
|
212
203
|
if (setSelectedDestinationChain) {
|
|
@@ -240,25 +231,13 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
240
231
|
// Sync global destination token with useSendForm
|
|
241
232
|
useEffect(() => {
|
|
242
233
|
if (globalDestinationToken && selectedDestToken && !toToken) {
|
|
243
|
-
const decimals =
|
|
244
|
-
globalDestinationToken.contractInfo?.decimals ??
|
|
245
|
-
(globalDestinationToken as any)?.decimals
|
|
246
|
-
|
|
247
|
-
// Convert global token format to useSendForm format
|
|
248
|
-
const formattedToken = {
|
|
249
|
-
symbol: globalDestinationToken.symbol,
|
|
250
|
-
name: globalDestinationToken.name,
|
|
251
|
-
imageUrl: globalDestinationToken.imageUrl,
|
|
252
|
-
decimals,
|
|
253
|
-
}
|
|
254
|
-
|
|
255
234
|
// Only update if the tokens are different (to avoid infinite loops)
|
|
256
|
-
if (selectedDestToken.symbol !==
|
|
235
|
+
if (selectedDestToken.symbol !== globalDestinationToken.symbol) {
|
|
257
236
|
logger.console.log(
|
|
258
237
|
"[trails-sdk] Restoring destination token from global state:",
|
|
259
|
-
|
|
238
|
+
globalDestinationToken,
|
|
260
239
|
)
|
|
261
|
-
setSelectedDestToken(
|
|
240
|
+
setSelectedDestToken(globalDestinationToken)
|
|
262
241
|
|
|
263
242
|
// Also update destination chain to match the selected token's chain
|
|
264
243
|
if (setSelectedDestinationChain && globalDestinationToken.chainId) {
|
|
@@ -280,22 +259,12 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
280
259
|
// Force restore global destination token on mount (runs after useSendForm initialization)
|
|
281
260
|
useEffect(() => {
|
|
282
261
|
if (globalDestinationToken && !toToken) {
|
|
283
|
-
const decimals =
|
|
284
|
-
globalDestinationToken.contractInfo?.decimals ??
|
|
285
|
-
(globalDestinationToken as any)?.decimals
|
|
286
|
-
|
|
287
262
|
const timeoutId = setTimeout(() => {
|
|
288
|
-
const formattedToken = {
|
|
289
|
-
symbol: globalDestinationToken.symbol,
|
|
290
|
-
name: globalDestinationToken.name,
|
|
291
|
-
imageUrl: globalDestinationToken.imageUrl,
|
|
292
|
-
decimals,
|
|
293
|
-
}
|
|
294
263
|
logger.console.log(
|
|
295
264
|
"[trails-sdk] Force restoring destination token on mount:",
|
|
296
|
-
|
|
265
|
+
globalDestinationToken,
|
|
297
266
|
)
|
|
298
|
-
setSelectedDestToken(
|
|
267
|
+
setSelectedDestToken(globalDestinationToken)
|
|
299
268
|
|
|
300
269
|
if (setSelectedDestinationChain && globalDestinationToken.chainId) {
|
|
301
270
|
const chainInfo = getChainInfo(globalDestinationToken.chainId)
|
|
@@ -524,18 +493,8 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
524
493
|
})
|
|
525
494
|
|
|
526
495
|
const handleOriginTokenSelect = useCallback(
|
|
527
|
-
(token:
|
|
528
|
-
|
|
529
|
-
...token,
|
|
530
|
-
decimals: token.contractInfo?.decimals || token.decimals,
|
|
531
|
-
contractInfo: {
|
|
532
|
-
decimals: token.contractInfo?.decimals || token.decimals,
|
|
533
|
-
contractAddress: token.contractAddress,
|
|
534
|
-
symbol: token.symbol,
|
|
535
|
-
name: token.name,
|
|
536
|
-
},
|
|
537
|
-
} as any
|
|
538
|
-
setOriginToken(formattedToken)
|
|
496
|
+
(token: Token) => {
|
|
497
|
+
setOriginToken(token)
|
|
539
498
|
logger.console.log("[trails-sdk] selected origin token", token)
|
|
540
499
|
setShowOriginTokenSelector(false)
|
|
541
500
|
// Track the token selection
|
|
@@ -545,21 +504,10 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
545
504
|
)
|
|
546
505
|
|
|
547
506
|
const handleDestinationTokenSelect = useCallback(
|
|
548
|
-
(token:
|
|
549
|
-
const formattedToken = {
|
|
550
|
-
...token,
|
|
551
|
-
decimals: token.contractInfo?.decimals || token.decimals,
|
|
552
|
-
contractInfo: {
|
|
553
|
-
decimals: token.contractInfo?.decimals || token.decimals,
|
|
554
|
-
contractAddress: token.contractAddress,
|
|
555
|
-
symbol: token.symbol,
|
|
556
|
-
name: token.name,
|
|
557
|
-
},
|
|
558
|
-
}
|
|
559
|
-
|
|
507
|
+
(token: Token) => {
|
|
560
508
|
// Update both global destination token state and useSendForm state
|
|
561
|
-
setDestinationToken(
|
|
562
|
-
setSelectedDestToken(
|
|
509
|
+
setDestinationToken(token)
|
|
510
|
+
setSelectedDestToken(token)
|
|
563
511
|
|
|
564
512
|
// Update destination chain to match the selected token's chain
|
|
565
513
|
if (setSelectedDestinationChain && token.chainId) {
|
|
@@ -624,17 +572,7 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
624
572
|
compactMode={false}
|
|
625
573
|
recentTokens={recentTokens}
|
|
626
574
|
onRecentTokenSelect={(token) => {
|
|
627
|
-
|
|
628
|
-
...token,
|
|
629
|
-
decimals: token.decimals,
|
|
630
|
-
contractInfo: {
|
|
631
|
-
decimals: token.decimals,
|
|
632
|
-
contractAddress: token.contractAddress,
|
|
633
|
-
symbol: token.symbol,
|
|
634
|
-
name: token.name,
|
|
635
|
-
},
|
|
636
|
-
} as any
|
|
637
|
-
setOriginToken(formattedToken)
|
|
575
|
+
setOriginToken(token)
|
|
638
576
|
setShowOriginTokenSelector(false)
|
|
639
577
|
onRecentTokenSelect?.(token)
|
|
640
578
|
}}
|
|
@@ -670,18 +608,8 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
670
608
|
compactMode={false}
|
|
671
609
|
recentTokens={recentTokens}
|
|
672
610
|
onRecentTokenSelect={(token) => {
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
decimals: token.decimals,
|
|
676
|
-
contractInfo: {
|
|
677
|
-
decimals: token.decimals,
|
|
678
|
-
contractAddress: token.contractAddress,
|
|
679
|
-
symbol: token.symbol,
|
|
680
|
-
name: token.name,
|
|
681
|
-
},
|
|
682
|
-
} as any
|
|
683
|
-
setDestinationToken(formattedToken)
|
|
684
|
-
setSelectedDestToken(formattedToken)
|
|
611
|
+
setDestinationToken(token)
|
|
612
|
+
setSelectedDestToken(token)
|
|
685
613
|
setShowDestinationTokenSelector(false)
|
|
686
614
|
onRecentTokenSelect?.(token)
|
|
687
615
|
}}
|
|
@@ -852,7 +780,7 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
852
780
|
{/* Percentage Buttons */}
|
|
853
781
|
<PercentageMaxButtons
|
|
854
782
|
userBalance={balanceFormatted}
|
|
855
|
-
isNativeToken={originToken.
|
|
783
|
+
isNativeToken={originToken.isNativeToken ?? false}
|
|
856
784
|
gasCostFormatted={prepareSendQuote?.gasCostFormatted}
|
|
857
785
|
chainId={originToken.chainId}
|
|
858
786
|
onAmountSelect={(amount) => {
|
|
@@ -1114,30 +1042,6 @@ export const Fund: React.FC<FundProps> = ({
|
|
|
1114
1042
|
severity="warning"
|
|
1115
1043
|
/>
|
|
1116
1044
|
|
|
1117
|
-
{prepareSendQuote?.noSufficientBalance ? (
|
|
1118
|
-
<div className="px-2 py-3 rounded-lg bg-amber-500/10 border border-solid border-amber-500/30">
|
|
1119
|
-
<div className="flex items-center space-x-2">
|
|
1120
|
-
<svg
|
|
1121
|
-
className="w-4 h-4 text-amber-500 flex-shrink-0"
|
|
1122
|
-
fill="none"
|
|
1123
|
-
stroke="currentColor"
|
|
1124
|
-
viewBox="0 0 24 24"
|
|
1125
|
-
aria-hidden="true"
|
|
1126
|
-
>
|
|
1127
|
-
<path
|
|
1128
|
-
strokeLinecap="round"
|
|
1129
|
-
strokeLinejoin="round"
|
|
1130
|
-
strokeWidth={2}
|
|
1131
|
-
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"
|
|
1132
|
-
/>
|
|
1133
|
-
</svg>
|
|
1134
|
-
<p className="text-sm text-amber-600 dark:text-amber-400">
|
|
1135
|
-
Insufficient balance to complete this transaction
|
|
1136
|
-
</p>
|
|
1137
|
-
</div>
|
|
1138
|
-
</div>
|
|
1139
|
-
) : null}
|
|
1140
|
-
|
|
1141
1045
|
{/* Fund Button */}
|
|
1142
1046
|
<form onSubmit={handleSubmit}>
|
|
1143
1047
|
<button
|
|
@@ -11,14 +11,12 @@ import { useSelectedFundMethod } from "../hooks/useSelectedFundMethod.js"
|
|
|
11
11
|
export interface FundMethodsProps {
|
|
12
12
|
onBack?: () => void
|
|
13
13
|
onSelectWalletConnect: () => void
|
|
14
|
-
onSelectExchangeList: () => void
|
|
15
14
|
onSelectConnectedAccount: () => void
|
|
16
15
|
onSelectQrCode: () => void
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
const FundMethods: React.FC<FundMethodsProps> = ({
|
|
20
19
|
onBack,
|
|
21
|
-
onSelectExchangeList,
|
|
22
20
|
onSelectQrCode,
|
|
23
21
|
}) => {
|
|
24
22
|
const { switchAccount } = useSwitchAccount()
|
|
@@ -40,7 +38,7 @@ const FundMethods: React.FC<FundMethodsProps> = ({
|
|
|
40
38
|
)
|
|
41
39
|
|
|
42
40
|
if (connection) {
|
|
43
|
-
|
|
41
|
+
switchAccount({
|
|
44
42
|
connector: connection.connector,
|
|
45
43
|
})
|
|
46
44
|
logger.console.log(`[trails-sdk] Switched to wallet: ${walletAddress}`)
|
|
@@ -102,9 +100,14 @@ const FundMethods: React.FC<FundMethodsProps> = ({
|
|
|
102
100
|
|
|
103
101
|
<button
|
|
104
102
|
type="button"
|
|
105
|
-
onClick={
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
onClick={() => {
|
|
104
|
+
// Set fund method to "exchange" so useSendForm knows to use onramp
|
|
105
|
+
setSelectedFundMethod("exchange")
|
|
106
|
+
// Navigate to home screen so user can fill out the form
|
|
107
|
+
// When they click "Continue to Exchange", it will navigate to onramp screen
|
|
108
|
+
setCurrentScreen("home")
|
|
109
|
+
}}
|
|
110
|
+
className="w-full text-left px-3 py-4 text-sm flex items-center justify-between cursor-pointer transition-colors trails-text-primary trails-hover-bg"
|
|
108
111
|
>
|
|
109
112
|
<div className="flex items-center gap-3">
|
|
110
113
|
<ArrowLeftRight className="w-4 h-4" />
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type React from "react"
|
|
2
2
|
import type { Account, WalletClient } from "viem"
|
|
3
3
|
import type { TransactionState } from "../../transactions.js"
|
|
4
|
-
import type { OnCompleteProps
|
|
5
|
-
import type {
|
|
4
|
+
import type { OnCompleteProps } from "../hooks/useSendForm.js"
|
|
5
|
+
import type { Token } from "../../tokens.js"
|
|
6
6
|
import type { CheckoutOnHandlers } from "../hooks/useCheckout.js"
|
|
7
7
|
import type { PrepareSendQuote } from "../../prepareSend.js"
|
|
8
8
|
import { ClassicSwap } from "./ClassicSwap.js"
|
|
@@ -27,7 +27,7 @@ interface FundProps {
|
|
|
27
27
|
setWalletConfirmRetryHandler: (handler: () => Promise<void>) => void
|
|
28
28
|
quoteProvider?: string
|
|
29
29
|
fundMethod?: string
|
|
30
|
-
|
|
30
|
+
onNavigateToOnramp?: (
|
|
31
31
|
props: {
|
|
32
32
|
toTokenSymbol: string
|
|
33
33
|
toTokenAmount: string
|
|
@@ -35,11 +35,12 @@ interface FundProps {
|
|
|
35
35
|
toRecipientAddress: string
|
|
36
36
|
},
|
|
37
37
|
quote?: PrepareSendQuote | null,
|
|
38
|
+
continueSend?: () => Promise<void>,
|
|
38
39
|
) => void
|
|
39
40
|
onAmountUpdate?: (amount: string) => void
|
|
40
41
|
checkoutOnHandlers?: CheckoutOnHandlers
|
|
41
|
-
recentTokens?:
|
|
42
|
-
onRecentTokenSelect?: (token:
|
|
42
|
+
recentTokens?: Token[]
|
|
43
|
+
onRecentTokenSelect?: (token: Token) => void
|
|
43
44
|
onTrackToken?: (token: any) => void
|
|
44
45
|
isSequenceWallet?: boolean
|
|
45
46
|
}
|
|
@@ -2,9 +2,9 @@ import { ChevronRight, QrCode, Send } from "lucide-react"
|
|
|
2
2
|
import type React from "react"
|
|
3
3
|
import { truncateAddress } from "../../utils.js"
|
|
4
4
|
import { useAccount, useConnections } from "wagmi"
|
|
5
|
-
import { Identicon } from "./Identicon.js"
|
|
6
5
|
import { useBack } from "../hooks/useBack.js"
|
|
7
6
|
import { useSelectedFundMethod } from "../hooks/useSelectedFundMethod.js"
|
|
7
|
+
import { AddressWalletIcon } from "./AddressWalletIcon.js"
|
|
8
8
|
|
|
9
9
|
export const FundingMethodSelectorButton: React.FC = () => {
|
|
10
10
|
const connections = useConnections()
|
|
@@ -52,7 +52,7 @@ export const FundingMethodSelectorButton: React.FC = () => {
|
|
|
52
52
|
) : (
|
|
53
53
|
<>
|
|
54
54
|
<div className="flex items-center mr-1">
|
|
55
|
-
<
|
|
55
|
+
<AddressWalletIcon walletAddress={activeAddress} />
|
|
56
56
|
</div>
|
|
57
57
|
<span className="text-sm font-medium m-0">
|
|
58
58
|
{truncateAddress(activeAddress, 4, 4)}
|