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
|
@@ -1,170 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChevronDown,
|
|
3
|
-
History,
|
|
4
|
-
LogOut,
|
|
5
|
-
Copy,
|
|
6
|
-
AlignJustify,
|
|
7
|
-
ArrowLeftRight,
|
|
8
|
-
} from "lucide-react"
|
|
1
|
+
import { ChevronDown } from "lucide-react"
|
|
9
2
|
import type React from "react"
|
|
10
|
-
import { useRef, useState } from "react"
|
|
11
3
|
import { truncateAddress } from "../../utils.js"
|
|
12
|
-
import {
|
|
13
|
-
import { useAccount, useConnections } from "wagmi"
|
|
4
|
+
import { useAccount } from "wagmi"
|
|
14
5
|
import { WalletImage } from "./WalletImage.js"
|
|
15
|
-
import {
|
|
16
|
-
import { useWidgetProps } from "../hooks/useWidgetProps.js"
|
|
17
|
-
import { useCurrentScreen, type Screen } from "../hooks/useCurrentScreen.js"
|
|
18
|
-
import { HideBalances } from "./HideBalances.js"
|
|
19
|
-
|
|
20
|
-
const ACTIONS = [
|
|
21
|
-
{
|
|
22
|
-
label: "Account History",
|
|
23
|
-
screen: "account-history",
|
|
24
|
-
icon: History,
|
|
25
|
-
disabled: FeatureFlags.accountIntentTransactionHistory === false,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
label: "Switch wallet",
|
|
29
|
-
screen: "connect",
|
|
30
|
-
icon: ArrowLeftRight,
|
|
31
|
-
disabled: false,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
label: "Connect another wallet",
|
|
35
|
-
screen: "wallet-list",
|
|
36
|
-
icon: AlignJustify,
|
|
37
|
-
disabled: false,
|
|
38
|
-
},
|
|
39
|
-
{ label: "Disconnect", screen: "disconnect", icon: LogOut, disabled: false },
|
|
40
|
-
] as const
|
|
6
|
+
import { useCurrentScreen } from "../hooks/useCurrentScreen.js"
|
|
41
7
|
|
|
42
8
|
export const AccountActionsDropdown: React.FC = () => {
|
|
43
|
-
const { address
|
|
44
|
-
const connections = useConnections()
|
|
45
|
-
const [isOpen, setIsOpen] = useState(false)
|
|
46
|
-
const [copiedAddress, setCopiedAddress] = useState<string | null>(null)
|
|
47
|
-
const dropdownRef = useRef<HTMLDivElement>(null)
|
|
48
|
-
const { hideDisconnect, decoupleWagmi } = useWidgetProps()
|
|
9
|
+
const { address } = useAccount()
|
|
49
10
|
const { setCurrentScreen } = useCurrentScreen()
|
|
50
11
|
|
|
51
|
-
// Check if there are multiple wallets connected
|
|
52
|
-
const hasMultipleWallets = connections.length > 1
|
|
53
|
-
|
|
54
|
-
// Handle copy to clipboard with success indication
|
|
55
|
-
const handleCopyAddress = async (address: string, e: React.MouseEvent) => {
|
|
56
|
-
e.preventDefault()
|
|
57
|
-
e.stopPropagation()
|
|
58
|
-
try {
|
|
59
|
-
await navigator.clipboard.writeText(address)
|
|
60
|
-
setCopiedAddress(address)
|
|
61
|
-
setTimeout(() => setCopiedAddress(null), 2000) // Clear after 2 seconds
|
|
62
|
-
} catch (error) {
|
|
63
|
-
console.error("Failed to copy address:", error)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
12
|
return (
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
>
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</button>
|
|
83
|
-
|
|
84
|
-
{isOpen && (
|
|
85
|
-
<div className="absolute top-full right-0 mt-1 w-56 border border-solid rounded-lg shadow-lg overflow-hidden bg-white border-gray-200 text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-200 z-10">
|
|
86
|
-
<div className="px-3 py-2 border-b border-gray-100 dark:border-gray-700">
|
|
87
|
-
<div className="text-xs text-gray-500 dark:text-gray-400 mb-1 text-left">
|
|
88
|
-
Connected with:
|
|
89
|
-
</div>
|
|
90
|
-
<div className="text-xs text-gray-600 dark:text-gray-300 flex items-center gap-2 mb-1">
|
|
91
|
-
<WalletImage size={14} />
|
|
92
|
-
<span className="font-medium">
|
|
93
|
-
{getWalletName(
|
|
94
|
-
connector ? wagmiConnectorToWalletId(connector) : "",
|
|
95
|
-
)}
|
|
96
|
-
</span>
|
|
97
|
-
</div>
|
|
98
|
-
<div className="flex items-center gap-1">
|
|
99
|
-
<span className="text-xs text-gray-600 dark:text-gray-300">
|
|
100
|
-
{truncateAddress(address, 8, 6)}
|
|
101
|
-
</span>
|
|
102
|
-
<button
|
|
103
|
-
type="button"
|
|
104
|
-
onClick={(e) => address && handleCopyAddress(address, e)}
|
|
105
|
-
className={`p-0.5 rounded transition-all duration-200 cursor-pointer ${
|
|
106
|
-
copiedAddress === address
|
|
107
|
-
? "bg-green-100 dark:bg-green-900/30"
|
|
108
|
-
: "hover:bg-gray-200 dark:hover:bg-gray-600"
|
|
109
|
-
}`}
|
|
110
|
-
title={
|
|
111
|
-
copiedAddress === address ? "Copied!" : "Copy full address"
|
|
112
|
-
}
|
|
113
|
-
>
|
|
114
|
-
{copiedAddress === address ? (
|
|
115
|
-
<svg
|
|
116
|
-
className="w-3 h-3 text-green-600 dark:text-green-400"
|
|
117
|
-
fill="none"
|
|
118
|
-
viewBox="0 0 24 24"
|
|
119
|
-
stroke="currentColor"
|
|
120
|
-
aria-label="Copied"
|
|
121
|
-
>
|
|
122
|
-
<title>Copied</title>
|
|
123
|
-
<path
|
|
124
|
-
strokeLinecap="round"
|
|
125
|
-
strokeLinejoin="round"
|
|
126
|
-
strokeWidth={2}
|
|
127
|
-
d="M5 13l4 4L19 7"
|
|
128
|
-
/>
|
|
129
|
-
</svg>
|
|
130
|
-
) : (
|
|
131
|
-
<Copy className="w-3 h-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300" />
|
|
132
|
-
)}
|
|
133
|
-
</button>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
|
|
137
|
-
<HideBalances />
|
|
138
|
-
|
|
139
|
-
{ACTIONS.map((action) => {
|
|
140
|
-
if (action.disabled) return null
|
|
141
|
-
// Hide disconnect action if hideDisconnect is true
|
|
142
|
-
if (
|
|
143
|
-
(hideDisconnect || decoupleWagmi) &&
|
|
144
|
-
action.screen === "disconnect"
|
|
145
|
-
)
|
|
146
|
-
return null
|
|
147
|
-
// Hide switch wallet action if there's only one wallet connected
|
|
148
|
-
if (action.screen === "connect" && !hasMultipleWallets) return null
|
|
149
|
-
const IconComponent = action.icon
|
|
150
|
-
return (
|
|
151
|
-
<button
|
|
152
|
-
key={action.screen}
|
|
153
|
-
type="button"
|
|
154
|
-
onClick={() => {
|
|
155
|
-
setCurrentScreen(action.screen as Screen)
|
|
156
|
-
setIsOpen(false)
|
|
157
|
-
}}
|
|
158
|
-
className="w-full text-left px-3 py-2 text-sm text-gray-700 hover:bg-gray-50 dark:text-gray-200 dark:hover:bg-gray-700 flex items-center gap-2 cursor-pointer"
|
|
159
|
-
>
|
|
160
|
-
<IconComponent className="w-4 h-4" />
|
|
161
|
-
{action.label}
|
|
162
|
-
</button>
|
|
163
|
-
)
|
|
164
|
-
})}
|
|
165
|
-
</div>
|
|
166
|
-
)}
|
|
167
|
-
</div>
|
|
13
|
+
<button
|
|
14
|
+
type="button"
|
|
15
|
+
onClick={() => setCurrentScreen("account-settings")}
|
|
16
|
+
className="flex h-8 px-4 justify-between items-center rounded-full border border-gray-300 bg-gray-50 dark:border-gray-600 dark:bg-gray-700 cursor-pointer transition-colors text-gray-900 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-600"
|
|
17
|
+
title="Open account settings"
|
|
18
|
+
>
|
|
19
|
+
<div className="flex items-center gap-2">
|
|
20
|
+
<WalletImage size={16} />
|
|
21
|
+
<span className="text-xs text-gray-600 dark:text-gray-400 font-medium">
|
|
22
|
+
{truncateAddress(address, 4, 2)}
|
|
23
|
+
</span>
|
|
24
|
+
</div>
|
|
25
|
+
<ChevronDown className="w-4 h-4" />
|
|
26
|
+
</button>
|
|
168
27
|
)
|
|
169
28
|
}
|
|
170
29
|
|