0xtrails 0.1.13 → 0.2.1
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.map +1 -1
- package/dist/analytics.d.ts +12 -2
- package/dist/analytics.d.ts.map +1 -1
- package/dist/apiClient.d.ts +1 -1
- package/dist/apiClient.d.ts.map +1 -1
- package/dist/{ccip-D3gTQONK.js → ccip-BbfANth7.js} +12 -12
- package/dist/cctp.d.ts.map +1 -1
- package/dist/cctpqueue.d.ts +3 -3
- package/dist/cctpqueue.d.ts.map +1 -1
- package/dist/chains.d.ts.map +1 -1
- package/dist/config.d.ts +18 -5
- package/dist/config.d.ts.map +1 -1
- package/dist/constants.d.ts +6 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/contractUtils.d.ts +2 -0
- package/dist/contractUtils.d.ts.map +1 -1
- package/dist/customChains.d.ts +24 -0
- package/dist/customChains.d.ts.map +1 -0
- package/dist/gasless.d.ts +19 -7
- package/dist/gasless.d.ts.map +1 -1
- package/dist/{index-CnUM7lKf.js → index-WpIVoh3X.js} +36741 -31761
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +405 -394
- package/dist/indexerClient.d.ts +10 -0
- package/dist/indexerClient.d.ts.map +1 -1
- package/dist/intentEntrypoint.d.ts +122 -0
- package/dist/intentEntrypoint.d.ts.map +1 -0
- package/dist/intents.d.ts +5 -3
- package/dist/intents.d.ts.map +1 -1
- package/dist/metaTxnMonitor.d.ts.map +1 -1
- package/dist/morpho.d.ts.map +1 -1
- package/dist/pools.d.ts +3 -1
- package/dist/pools.d.ts.map +1 -1
- package/dist/prepareSend.d.ts +18 -9
- 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/relaySdk.d.ts.map +1 -1
- package/dist/relayer.d.ts.map +1 -1
- package/dist/toast.d.ts +9 -0
- package/dist/toast.d.ts.map +1 -0
- package/dist/tokenBalances.d.ts +6 -2
- package/dist/tokenBalances.d.ts.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/trails.d.ts +6 -5
- package/dist/trails.d.ts.map +1 -1
- package/dist/trailsClient.d.ts +12 -0
- package/dist/trailsClient.d.ts.map +1 -0
- package/dist/trailsRouter.d.ts +22 -0
- package/dist/trailsRouter.d.ts.map +1 -0
- package/dist/transactions.d.ts +8 -1
- package/dist/transactions.d.ts.map +1 -1
- package/dist/wallets.d.ts.map +1 -1
- package/dist/widget/components/AccountActionsDropdown.d.ts.map +1 -1
- package/dist/widget/components/AccountIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/components/AccountSettings.d.ts +7 -0
- package/dist/widget/components/AccountSettings.d.ts.map +1 -0
- package/dist/widget/components/ChainList.d.ts +0 -1
- package/dist/widget/components/ChainList.d.ts.map +1 -1
- package/dist/widget/components/ClassicSwap.d.ts +46 -0
- package/dist/widget/components/ClassicSwap.d.ts.map +1 -0
- package/dist/widget/components/ConfigDisplay.d.ts.map +1 -1
- package/dist/widget/components/ConnectWallet.d.ts.map +1 -1
- package/dist/widget/components/ConnectedWallets.d.ts +9 -0
- package/dist/widget/components/ConnectedWallets.d.ts.map +1 -0
- package/dist/widget/components/DebugMenu.d.ts.map +1 -1
- package/dist/widget/components/DebugScreensList.d.ts.map +1 -1
- package/dist/widget/components/DebugToast.d.ts +3 -0
- package/dist/widget/components/DebugToast.d.ts.map +1 -0
- package/dist/widget/components/Earn.d.ts.map +1 -1
- package/dist/widget/components/EarnPools.d.ts.map +1 -1
- package/dist/widget/components/FeeOption.d.ts +22 -0
- package/dist/widget/components/FeeOption.d.ts.map +1 -0
- package/dist/widget/components/FeeOptions.d.ts +13 -17
- package/dist/widget/components/FeeOptions.d.ts.map +1 -1
- package/dist/widget/components/Fund.d.ts +44 -0
- package/dist/widget/components/Fund.d.ts.map +1 -0
- package/dist/widget/components/FundMethods.d.ts +1 -1
- package/dist/widget/components/FundMethods.d.ts.map +1 -1
- package/dist/widget/components/FundSendForm.d.ts.map +1 -1
- package/dist/widget/components/Identicon.d.ts +9 -0
- package/dist/widget/components/Identicon.d.ts.map +1 -0
- package/dist/widget/components/MeshConnectExchanges.d.ts +5 -2
- package/dist/widget/components/MeshConnectExchanges.d.ts.map +1 -1
- package/dist/widget/components/MeshConnectFlow.d.ts +2 -0
- package/dist/widget/components/MeshConnectFlow.d.ts.map +1 -1
- package/dist/widget/components/NativeGasOption.d.ts +12 -0
- package/dist/widget/components/NativeGasOption.d.ts.map +1 -0
- package/dist/widget/components/Pay.d.ts +46 -0
- package/dist/widget/components/Pay.d.ts.map +1 -0
- package/dist/widget/components/PaySendForm.d.ts.map +1 -1
- package/dist/widget/components/QuoteDetails.d.ts.map +1 -1
- package/dist/widget/components/Receive.d.ts.map +1 -1
- package/dist/widget/components/RecentTokens.d.ts.map +1 -1
- package/dist/widget/components/Recipients.d.ts +9 -0
- package/dist/widget/components/Recipients.d.ts.map +1 -0
- package/dist/widget/components/RefundWarning.d.ts +9 -0
- package/dist/widget/components/RefundWarning.d.ts.map +1 -0
- package/dist/widget/components/SimpleSwap.d.ts.map +1 -1
- package/dist/widget/components/Swap.d.ts.map +1 -1
- package/dist/widget/components/SwapSettings.d.ts +1 -5
- package/dist/widget/components/SwapSettings.d.ts.map +1 -1
- package/dist/widget/components/ThemeProvider.d.ts.map +1 -1
- package/dist/widget/components/ThemeSyncer.d.ts +6 -0
- package/dist/widget/components/ThemeSyncer.d.ts.map +1 -0
- package/dist/widget/components/Toast.d.ts +24 -0
- package/dist/widget/components/Toast.d.ts.map +1 -0
- package/dist/widget/components/TokenList.d.ts.map +1 -1
- package/dist/widget/components/TokenSelector.d.ts.map +1 -1
- package/dist/widget/components/TransactionDetails.d.ts.map +1 -1
- package/dist/widget/components/TruncatedAddress.d.ts +2 -0
- package/dist/widget/components/TruncatedAddress.d.ts.map +1 -1
- package/dist/widget/components/UserPreferences.d.ts +7 -0
- package/dist/widget/components/UserPreferences.d.ts.map +1 -0
- package/dist/widget/hooks/useBack.d.ts +2 -0
- package/dist/widget/hooks/useBack.d.ts.map +1 -1
- package/dist/widget/hooks/useBalanceVisible.d.ts +1 -0
- package/dist/widget/hooks/useBalanceVisible.d.ts.map +1 -1
- package/dist/widget/hooks/useCheckout.d.ts.map +1 -1
- package/dist/widget/hooks/useCurrentScreen.d.ts +1 -1
- package/dist/widget/hooks/useCurrentScreen.d.ts.map +1 -1
- package/dist/widget/hooks/useDebugScreens.d.ts +1 -1
- package/dist/widget/hooks/useDebugScreens.d.ts.map +1 -1
- package/dist/widget/hooks/useDefaultTokenSelection.d.ts +54 -0
- package/dist/widget/hooks/useDefaultTokenSelection.d.ts.map +1 -0
- package/dist/widget/hooks/useIntentTransactionHistory.d.ts.map +1 -1
- package/dist/widget/hooks/usePayMessage.d.ts +34 -0
- package/dist/widget/hooks/usePayMessage.d.ts.map +1 -0
- package/dist/widget/hooks/useRecipients.d.ts +17 -0
- package/dist/widget/hooks/useRecipients.d.ts.map +1 -0
- package/dist/widget/hooks/useSelectedFeeToken.d.ts +32 -0
- package/dist/widget/hooks/useSelectedFeeToken.d.ts.map +1 -0
- package/dist/widget/hooks/useSelectedMeshExchange.d.ts +14 -0
- package/dist/widget/hooks/useSelectedMeshExchange.d.ts.map +1 -0
- package/dist/widget/hooks/useSelectedRecipient.d.ts +12 -0
- package/dist/widget/hooks/useSelectedRecipient.d.ts.map +1 -0
- package/dist/widget/hooks/useSendForm.d.ts +10 -13
- package/dist/widget/hooks/useSendForm.d.ts.map +1 -1
- package/dist/widget/hooks/useSwapAmount.d.ts +13 -0
- package/dist/widget/hooks/useSwapAmount.d.ts.map +1 -0
- package/dist/widget/hooks/useSwapSettings.d.ts +16 -0
- package/dist/widget/hooks/useSwapSettings.d.ts.map +1 -0
- package/dist/widget/hooks/useTargetAmount.d.ts +5 -0
- package/dist/widget/hooks/useTargetAmount.d.ts.map +1 -0
- package/dist/widget/hooks/useTheme.d.ts +14 -0
- package/dist/widget/hooks/useTheme.d.ts.map +1 -0
- package/dist/widget/hooks/useTokenList.d.ts.map +1 -1
- package/dist/widget/index.js +2 -2
- package/dist/widget/widget.d.ts +9 -0
- package/dist/widget/widget.d.ts.map +1 -1
- package/package.json +38 -36
- package/src/aave.ts +6 -1
- package/src/analytics.ts +109 -53
- package/src/apiClient.ts +1 -1
- package/src/cctp.ts +6 -2
- package/src/cctpqueue.ts +7 -7
- package/src/chains.ts +18 -0
- package/src/config.ts +63 -17
- package/src/constants.ts +20 -16
- package/src/contractUtils.ts +33 -2
- package/src/customChains.ts +24 -0
- package/src/gasless.ts +162 -109
- package/src/index.ts +11 -1
- package/src/indexerClient.ts +73 -1
- package/src/intentEntrypoint.ts +218 -0
- package/src/intents.ts +85 -54
- package/src/metaTxnMonitor.ts +1 -0
- package/src/morpho.ts +13 -2
- package/src/pools.ts +68 -86
- package/src/prepareSend.ts +1719 -967
- package/src/prices.ts +51 -7
- package/src/relaySdk.ts +6 -4
- package/src/relayer.ts +6 -3
- package/src/toast.ts +110 -0
- package/src/tokenBalances.ts +112 -20
- package/src/tokens.ts +70 -7
- package/src/trails.ts +81 -80
- package/src/trailsClient.ts +48 -0
- package/src/{proxyCaller.ts → trailsRouter.ts} +25 -20
- package/src/transactions.ts +30 -88
- package/src/umd.tsx +1 -1
- package/src/wallets.ts +2 -1
- package/src/widget/assets/sequence-logo.svg +15 -0
- package/src/widget/compiled.css +2 -2
- package/src/widget/components/AccountActionsDropdown.tsx +18 -159
- package/src/widget/components/AccountIntentTransactionHistory.tsx +346 -63
- package/src/widget/components/AccountSettings.tsx +102 -0
- package/src/widget/components/ChainFilterDropdown.tsx +1 -1
- package/src/widget/components/ChainList.tsx +10 -20
- package/src/widget/components/ClassicSwap.tsx +921 -0
- package/src/widget/components/ConfigDisplay.tsx +41 -5
- package/src/widget/components/ConnectWallet.tsx +168 -11
- package/src/widget/components/ConnectedWallets.tsx +342 -0
- package/src/widget/components/DebugMenu.tsx +2 -0
- package/src/widget/components/DebugScreensList.tsx +3 -0
- package/src/widget/components/DebugToast.tsx +63 -0
- package/src/widget/components/Earn.tsx +112 -143
- package/src/widget/components/EarnPools.tsx +2 -4
- package/src/widget/components/EarnPoolsFilters.tsx +6 -6
- package/src/widget/components/FeeOption.tsx +78 -0
- package/src/widget/components/FeeOptions.tsx +192 -127
- package/src/widget/components/Fund.tsx +1236 -0
- package/src/widget/components/FundMethods.tsx +4 -4
- package/src/widget/components/FundSendForm.tsx +1 -34
- package/src/widget/components/Identicon.tsx +158 -0
- package/src/widget/components/MeshConnectExchanges.tsx +32 -3
- package/src/widget/components/MeshConnectFlow.tsx +23 -4
- package/src/widget/components/NativeGasOption.tsx +99 -0
- package/src/widget/components/Pay.tsx +1092 -0
- package/src/widget/components/PaySendForm.tsx +1 -38
- package/src/widget/components/QuoteDetails.tsx +1 -30
- package/src/widget/components/Receipt.tsx +1 -1
- package/src/widget/components/Receive.tsx +4 -2
- package/src/widget/components/RecentTokens.tsx +2 -1
- package/src/widget/components/Recipients.tsx +448 -0
- package/src/widget/components/RefundWarning.tsx +61 -0
- package/src/widget/components/ScreenHeader.tsx +1 -1
- package/src/widget/components/SimpleSwap.tsx +74 -58
- package/src/widget/components/Swap.tsx +35 -853
- package/src/widget/components/SwapSettings.tsx +5 -11
- package/src/widget/components/ThemeProvider.tsx +32 -0
- package/src/widget/components/ThemeSyncer.tsx +47 -0
- package/src/widget/components/Toast.tsx +315 -0
- package/src/widget/components/TokenList.tsx +2 -34
- package/src/widget/components/TokenSelector.tsx +14 -3
- package/src/widget/components/TransactionDetails.tsx +153 -13
- package/src/widget/components/TransferPendingVertical.tsx +1 -1
- package/src/widget/components/TruncatedAddress.tsx +5 -1
- package/src/widget/components/UserPreferences.tsx +155 -0
- package/src/widget/components/WalletList.tsx +1 -1
- package/src/widget/hooks/useBack.tsx +4 -0
- package/src/widget/hooks/useBalanceVisible.tsx +40 -2
- package/src/widget/hooks/useCheckout.ts +13 -0
- package/src/widget/hooks/useCurrentScreen.tsx +4 -0
- package/src/widget/hooks/useDebugScreens.ts +12 -2
- package/src/widget/hooks/useDefaultTokenSelection.tsx +471 -0
- package/src/widget/hooks/useIntentTransactionHistory.ts +212 -0
- package/src/widget/hooks/usePayMessage.tsx +370 -0
- package/src/widget/hooks/useRecipients.ts +168 -0
- package/src/widget/hooks/useSelectedFeeToken.tsx +299 -0
- package/src/widget/hooks/useSelectedMeshExchange.tsx +46 -0
- package/src/widget/hooks/useSelectedRecipient.tsx +48 -0
- package/src/widget/hooks/useSendForm.ts +257 -49
- package/src/widget/hooks/useSwapAmount.tsx +50 -0
- package/src/widget/hooks/useSwapSettings.tsx +100 -0
- package/src/widget/hooks/useTargetAmount.ts +23 -0
- package/src/widget/hooks/useTheme.tsx +80 -0
- package/src/widget/hooks/useTokenList.ts +20 -11
- package/src/widget/index.css +45 -21
- package/src/widget/widget.tsx +294 -136
- package/dist/address.d.ts +0 -2
- package/dist/address.d.ts.map +0 -1
- package/dist/proxyCaller.d.ts +0 -21
- package/dist/proxyCaller.d.ts.map +0 -1
- package/src/address.ts +0 -6
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { LogOut, Plus, User, ChevronRight, History } from "lucide-react"
|
|
2
|
+
import type React from "react"
|
|
3
|
+
import { useWidgetProps } from "../hooks/useWidgetProps.js"
|
|
4
|
+
import { useCurrentScreen, type Screen } from "../hooks/useCurrentScreen.js"
|
|
5
|
+
import { ConnectedWallets } from "./ConnectedWallets.js"
|
|
6
|
+
import { ScreenHeader } from "./ScreenHeader.js"
|
|
7
|
+
import { logger } from "../../logger.js"
|
|
8
|
+
|
|
9
|
+
const ACTIONS = [
|
|
10
|
+
{
|
|
11
|
+
label: "History",
|
|
12
|
+
screen: "account-history",
|
|
13
|
+
icon: History,
|
|
14
|
+
disabled: false,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: "User preferences",
|
|
18
|
+
screen: "user-preferences",
|
|
19
|
+
icon: User,
|
|
20
|
+
disabled: false,
|
|
21
|
+
},
|
|
22
|
+
{ label: "Disconnect", screen: "disconnect", icon: LogOut, disabled: false },
|
|
23
|
+
] as const
|
|
24
|
+
|
|
25
|
+
interface AccountSettingsProps {
|
|
26
|
+
onBack?: () => void
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const AccountSettings: React.FC<AccountSettingsProps> = ({ onBack }) => {
|
|
30
|
+
const { hideDisconnect, decoupleWagmi } = useWidgetProps()
|
|
31
|
+
const { setCurrentScreen } = useCurrentScreen()
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div className="flex flex-col h-full">
|
|
35
|
+
<ScreenHeader
|
|
36
|
+
headerContent="Settings"
|
|
37
|
+
headerContentAlign="left"
|
|
38
|
+
onBack={onBack}
|
|
39
|
+
showAccountActions={false}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
{/* Connected Wallets */}
|
|
43
|
+
<div>
|
|
44
|
+
<ConnectedWallets />
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
{/* Link a Wallet */}
|
|
48
|
+
<div className="mb-4">
|
|
49
|
+
<button
|
|
50
|
+
type="button"
|
|
51
|
+
onClick={() => {
|
|
52
|
+
logger.console.log(
|
|
53
|
+
"[trails-sdk] Navigating from account-settings to wallet-list",
|
|
54
|
+
)
|
|
55
|
+
setCurrentScreen("wallet-list")
|
|
56
|
+
}}
|
|
57
|
+
className="w-full text-left px-0 py-3 text-sm trails-list-item flex items-center justify-between cursor-pointer transition-colors border-b border-gray-200 dark:border-gray-700 trails-text-primary"
|
|
58
|
+
>
|
|
59
|
+
<div className="flex items-center gap-3">
|
|
60
|
+
<Plus className="w-4 h-4" />
|
|
61
|
+
Link a Wallet
|
|
62
|
+
</div>
|
|
63
|
+
<span className="text-sm text-gray-500 dark:text-gray-400">›</span>
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
{/* Actions */}
|
|
68
|
+
<div className="space-y-0">
|
|
69
|
+
{ACTIONS.map((action) => {
|
|
70
|
+
if (action.disabled) return null
|
|
71
|
+
// Hide disconnect action if hideDisconnect is true
|
|
72
|
+
if (
|
|
73
|
+
(hideDisconnect || decoupleWagmi) &&
|
|
74
|
+
action.screen === "disconnect"
|
|
75
|
+
)
|
|
76
|
+
return null
|
|
77
|
+
|
|
78
|
+
const IconComponent = action.icon
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<button
|
|
82
|
+
key={action.screen}
|
|
83
|
+
type="button"
|
|
84
|
+
onClick={() => {
|
|
85
|
+
setCurrentScreen(action.screen as Screen)
|
|
86
|
+
}}
|
|
87
|
+
className={`w-full text-left px-0 py-3 text-sm trails-list-item flex items-center justify-between cursor-pointer transition-colors trails-text-primary`}
|
|
88
|
+
>
|
|
89
|
+
<div className="flex items-center gap-3">
|
|
90
|
+
<IconComponent className="w-4 h-4" />
|
|
91
|
+
{action.label}
|
|
92
|
+
</div>
|
|
93
|
+
<ChevronRight className="w-4 h-4 text-gray-400" />
|
|
94
|
+
</button>
|
|
95
|
+
)
|
|
96
|
+
})}
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export default AccountSettings
|
|
@@ -119,7 +119,7 @@ export const ChainFilterDropdown: React.FC<ChainFilterDropdownProps> = ({
|
|
|
119
119
|
/>
|
|
120
120
|
)}
|
|
121
121
|
<ChevronDown
|
|
122
|
-
className={`h-
|
|
122
|
+
className={`h-5 w-5 text-gray-400 transition-all duration-200 ${
|
|
123
123
|
isOpen ? "rotate-180" : ""
|
|
124
124
|
}`}
|
|
125
125
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState, useMemo
|
|
1
|
+
import { useState, useMemo } from "react"
|
|
2
2
|
import type React from "react"
|
|
3
3
|
import { AnimatePresence, motion } from "framer-motion"
|
|
4
4
|
import { ScreenHeader } from "./ScreenHeader.js"
|
|
@@ -6,8 +6,7 @@ import { ChainImage } from "./ChainImage.js"
|
|
|
6
6
|
import { AllChainsIcon } from "./AllChainsIcon.js"
|
|
7
7
|
import { SearchInputField } from "./SearchInputField.js"
|
|
8
8
|
import { useChainFilter } from "../hooks/useChainFilter.js"
|
|
9
|
-
import {
|
|
10
|
-
import type { Chain } from "viem"
|
|
9
|
+
import { useSupportedChains } from "../../chains.js"
|
|
11
10
|
|
|
12
11
|
export interface ChainListItem {
|
|
13
12
|
chainId: number
|
|
@@ -16,33 +15,22 @@ export interface ChainListItem {
|
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
interface ChainListProps {
|
|
19
|
-
chains?: ChainListItem[]
|
|
20
18
|
onBack: () => void
|
|
21
19
|
}
|
|
22
20
|
|
|
23
|
-
export const ChainList: React.FC<ChainListProps> = ({
|
|
21
|
+
export const ChainList: React.FC<ChainListProps> = ({ onBack }) => {
|
|
24
22
|
const [searchQuery, setSearchQuery] = useState("")
|
|
25
|
-
const [supportedChains, setSupportedChains] = useState<Chain[]>([])
|
|
26
23
|
const { selectedChainId, setSelectedChainId } = useChainFilter()
|
|
27
|
-
|
|
28
|
-
// Load supported chains on mount if no chains provided
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
if (!chains) {
|
|
31
|
-
getSupportedSequenceChains().then(setSupportedChains)
|
|
32
|
-
}
|
|
33
|
-
}, [chains])
|
|
24
|
+
const { supportedChains } = useSupportedChains()
|
|
34
25
|
|
|
35
26
|
// Convert chains to ChainListItem format
|
|
36
27
|
const chainList = useMemo(() => {
|
|
37
|
-
if (chains) {
|
|
38
|
-
return chains
|
|
39
|
-
}
|
|
40
28
|
return supportedChains.map((chain) => ({
|
|
41
29
|
chainId: chain.id,
|
|
42
30
|
name: chain.name,
|
|
43
31
|
imageUrl: "", // ChainImage component handles the icons
|
|
44
32
|
}))
|
|
45
|
-
}, [
|
|
33
|
+
}, [supportedChains])
|
|
46
34
|
|
|
47
35
|
// Filter chains based on search query
|
|
48
36
|
const filteredChains = useMemo(() => {
|
|
@@ -83,7 +71,7 @@ export const ChainList: React.FC<ChainListProps> = ({ chains, onBack }) => {
|
|
|
83
71
|
<motion.button
|
|
84
72
|
type="button"
|
|
85
73
|
onClick={() => handleChainSelect(null)}
|
|
86
|
-
className="w-full py-2 px-4 flex items-center space-x-3 transition-all duration-200 trails-
|
|
74
|
+
className="w-full py-2 px-4 flex items-center space-x-3 transition-all duration-200 trails-list-item trails-border-radius-list-button cursor-pointer"
|
|
87
75
|
title="Show tokens from all chains"
|
|
88
76
|
initial={{ opacity: 0, y: 20 }}
|
|
89
77
|
animate={{ opacity: 1, y: 0 }}
|
|
@@ -112,8 +100,10 @@ export const ChainList: React.FC<ChainListProps> = ({ chains, onBack }) => {
|
|
|
112
100
|
key={chain.chainId}
|
|
113
101
|
type="button"
|
|
114
102
|
onClick={() => handleChainSelect(chain.chainId)}
|
|
115
|
-
className={`w-full py-2 px-4 flex items-center space-x-3 transition-all duration-200 trails-
|
|
116
|
-
selectedChainId === chain.chainId
|
|
103
|
+
className={`w-full py-2 px-4 flex items-center space-x-3 transition-all duration-200 trails-list-item trails-border-radius-list-button cursor-pointer ${
|
|
104
|
+
selectedChainId === chain.chainId
|
|
105
|
+
? "trails-list-item-selected"
|
|
106
|
+
: ""
|
|
117
107
|
}`}
|
|
118
108
|
title={`Select ${chain.name}`}
|
|
119
109
|
initial={{ opacity: 0, y: 20 }}
|