-
- {fiatCurrency.sign}
- {isLoading ? : `${totalFiatValue}`}
+
+
+ Balance
-
- {coinBalances.length}
-
- }
- />
-
- ) : (
-
- No Tokens
-
- )
- }
- shape="square"
- >
-
- Tokens
-
- ,
- 0 ? (
-
- {collectibleBalances.length}
-
- }
- shape="square"
- />
- ) : (
-
- No Collectibles
-
- )
- }
- shape="square"
- >
-
- Collectibles
-
-
- ]
-
- return (
-
-
-
-
-
-
- {formatAddress(accountAddress || '')}
+
+ {fiatCurrency.symbol} {fiatCurrency.sign}
+ {totalFiatValue}
-
- {signInDisplay && (
-
- {signInDisplay}
-
- )}
-
-
-
-
-
-
-
-
-
-
- <>
-
- Items
-
- wallet.address)}
- label={
-
-
- {`${selectedWallets.length} Wallet${selectedWallets.length === 1 ? '' : 's'}`}
-
-
-
- }
- isAccount
- enabled
- onClick={onClickWalletSelector}
- />
- >
-
-
-
- Transactions
-
-
-
-
- Settings
-
-
-
- {accountSelectorModalOpen && (
- setAccountSelectorModalOpen(false)}
- label="Select main wallet"
- buttonLabel="+ Add new wallet"
- handleButtonPress={handleAddNewWallet}
- dragHandleWidth={74}
- >
-
- {wallets.map((wallet, index) => (
- setAccountSelectorModalOpen(false)}
- onClick={setActiveWallet}
- />
- ))}
-
-
- )}
- {walletFilterOpen && (
- setWalletFilterOpen(false)} label="Filter items by wallet">
-
-
- )}
-
+
)
}
diff --git a/packages/wallet-widget/src/views/Receive.tsx b/packages/wallet-widget/src/views/Receive.tsx
deleted file mode 100644
index f038fa565..000000000
--- a/packages/wallet-widget/src/views/Receive.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import { getNetwork } from '@0xsequence/connect'
-import { Button, CopyIcon, Image, ShareIcon, Text } from '@0xsequence/design-system'
-import { useClipboard } from '@0xsequence/hooks'
-import { QRCodeCanvas } from 'qrcode.react'
-import { useAccount } from 'wagmi'
-
-import { NetworkSelect } from '../components/Select/NetworkSelect.js'
-import { HEADER_HEIGHT_WITH_LABEL } from '../constants/index.js'
-
-const isVowel = (char: string) => ['a', 'e', 'i', 'o', 'u'].includes(char.toLowerCase())
-
-export const Receive = () => {
- const { address, chain } = useAccount()
- const [isCopied, setCopied] = useClipboard({ timeout: 4000 })
-
- const networkInfo = getNetwork(chain?.id || 1)
- const networkName = networkInfo.title || networkInfo.name
-
- const onClickShare = () => {
- if (typeof window !== 'undefined') {
- window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${address}`)
- }
- }
-
- return (
-
-
-
-
-
-
-
-
-
- My Wallet
-
-
-
-
-
- {address}
-
-
-
-
-
-
-
- {`This is a${isVowel(networkName[0]) ? 'n' : ''} ${networkName} address. Please only send assets on the ${networkName} network.`}
-
-
-
-
- )
-}
diff --git a/packages/wallet-widget/src/views/Receive/index.tsx b/packages/wallet-widget/src/views/Receive/index.tsx
new file mode 100644
index 000000000..bf2c6e6f6
--- /dev/null
+++ b/packages/wallet-widget/src/views/Receive/index.tsx
@@ -0,0 +1,56 @@
+import { useWallets } from '@0xsequence/connect'
+import { Button, CopyIcon, ShareIcon, Text } from '@0xsequence/design-system'
+import { useClipboard } from '@0xsequence/hooks'
+import { QRCodeCanvas } from 'qrcode.react'
+import { useAccount } from 'wagmi'
+
+import { WalletSelect } from '../../components/Select/WalletSelect.js'
+
+export const Receive = () => {
+ const { address } = useAccount()
+ const { setActiveWallet } = useWallets()
+ const [isCopied, setCopied] = useClipboard({ timeout: 4000 })
+
+ const onClickWallet = (address: string) => {
+ setActiveWallet(address)
+ }
+
+ const onClickShare = () => {
+ if (typeof window !== 'undefined') {
+ window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${address}`)
+ }
+ }
+
+ return (
+
+
+
+
+
+
+
+
+ My Wallet
+
+
+
+
+ {address}
+
+
+
+
+ setCopied(address || '')} leftIcon={CopyIcon} label={isCopied ? 'Copied!' : 'Copy'} />
+
+
+
+ )
+}
diff --git a/packages/wallet-widget/src/views/Search/SearchCollectibles.tsx b/packages/wallet-widget/src/views/Search/SearchCollectibles.tsx
deleted file mode 100644
index 7b0cda7fd..000000000
--- a/packages/wallet-widget/src/views/Search/SearchCollectibles.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-import { useGetContractInfo } from '@0xsequence/hooks'
-import { useObservable } from 'micro-observables'
-import { useEffect } from 'react'
-
-import { CollectiblesList } from '../../components/SearchLists/CollectiblesList.js'
-import { useGetAllTokensDetails, useNavigation, useSettings } from '../../hooks/index.js'
-import type { TokenBalanceWithPrice } from '../../utils/index.js'
-
-export const SearchCollectibles = ({
- contractAddress,
- chainId
-}: {
- contractAddress: string | undefined
- chainId: number | undefined
-}) => {
- const {
- selectedWalletsObservable,
- selectedNetworksObservable,
- selectedCollectionsObservable,
- hideUnlistedTokens,
- setSelectedCollections
- } = useSettings()
- const { setNavigation } = useNavigation()
-
- // Only fetch contract info if contract address and chain id are provided
- const { data: contractInfo } = useGetContractInfo(
- {
- chainID: String(chainId),
- contractAddress: contractAddress || ''
- },
- { disabled: !contractAddress || !chainId }
- )
-
- useEffect(() => {
- if (contractAddress && chainId && contractInfo) {
- setSelectedCollections([
- {
- contractAddress,
- chainId: Number(chainId),
- logoURI: contractInfo.logoURI,
- name: contractInfo.name
- }
- ])
- } else {
- setSelectedCollections([])
- }
- }, [contractInfo, contractAddress, chainId])
-
- const selectedWallets = useObservable(selectedWalletsObservable)
- const selectedNetworks = useObservable(selectedNetworksObservable)
- const selectedCollections = useObservable(selectedCollectionsObservable)
-
- const { data: tokenBalancesData = [], isLoading } = useGetAllTokensDetails({
- accountAddresses: selectedWallets.map(wallet => wallet.address),
- chainIds: selectedNetworks,
- contractWhitelist: selectedCollections.map(collection => collection.contractAddress),
- hideUnlistedTokens
- })
-
- const isSingleCollectionSelected = selectedCollections.length === 1
-
- const collectibleBalancesFiltered = tokenBalancesData.filter(token => {
- if (isSingleCollectionSelected && selectedCollections[0]) {
- // Ensure we only show tokens from the selected collection's chain and contract
- return (
- token.chainId === selectedCollections[0].chainId &&
- token.contractAddress.toLowerCase() === selectedCollections[0].contractAddress.toLowerCase()
- )
- }
- return true
- })
-
- const onHandleCollectibleClick = (balance: TokenBalanceWithPrice) => {
- setNavigation({
- location: 'collectible-details',
- params: {
- contractAddress: balance.contractAddress,
- chainId: balance.chainId,
- tokenId: balance.tokenID || '',
- accountAddress: balance.accountAddress
- }
- })
- }
-
- // Get the single selected collection details if available
- const singleCollection = isSingleCollectionSelected ? selectedCollections[0] : null
-
- // Prepare the header info object, only if a single collection is selected
- const collectionHeaderInfo = singleCollection
- ? {
- logoURI: singleCollection.logoURI,
- name: singleCollection.name,
- chainId: singleCollection.chainId
- // We could add collectibleBalancesFiltered.length here if needed later
- }
- : undefined
-
- return (
-
-
-
- )
-}
diff --git a/packages/wallet-widget/src/views/Search/SearchTokens.tsx b/packages/wallet-widget/src/views/Search/SearchTokens.tsx
deleted file mode 100644
index 6683f10a8..000000000
--- a/packages/wallet-widget/src/views/Search/SearchTokens.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import { useObservable } from 'micro-observables'
-
-import { TokenList } from '../../components/SearchLists/index.js'
-import { useNavigation, useSettings } from '../../hooks/index.js'
-import { useGetAllTokensDetails } from '../../hooks/index.js'
-import type { TokenBalanceWithPrice } from '../../utils/index.js'
-
-export const SearchTokens = () => {
- const { setNavigation } = useNavigation()
- const { selectedWalletsObservable, selectedNetworksObservable, hideUnlistedTokens } = useSettings()
-
- const selectedWallets = useObservable(selectedWalletsObservable)
- const selectedNetworks = useObservable(selectedNetworksObservable)
-
- const { data: tokenBalancesData, isLoading } = useGetAllTokensDetails({
- accountAddresses: selectedWallets.map(wallet => wallet.address),
- chainIds: selectedNetworks,
- hideUnlistedTokens
- })
-
- const handleTokenClick = (balance: TokenBalanceWithPrice) => {
- setNavigation({
- location: 'coin-details',
- params: {
- contractAddress: balance.contractAddress,
- chainId: balance.chainId,
- accountAddress: balance.accountAddress
- }
- })
- }
-
- return (
-
-
-
- )
-}
diff --git a/packages/wallet-widget/src/views/Search/index.ts b/packages/wallet-widget/src/views/Search/index.ts
deleted file mode 100644
index 41bd2e7b9..000000000
--- a/packages/wallet-widget/src/views/Search/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './SearchTokens.js'
-export * from './SearchCollectibles.js'
diff --git a/packages/wallet-widget/src/views/Search/index.tsx b/packages/wallet-widget/src/views/Search/index.tsx
new file mode 100644
index 000000000..3c496467c
--- /dev/null
+++ b/packages/wallet-widget/src/views/Search/index.tsx
@@ -0,0 +1,5 @@
+import { GeneralList } from '../../components/SearchLists/GeneralList.js'
+
+export const Search = () => {
+ return
+}
diff --git a/packages/wallet-widget/src/views/Send/SendCoin.tsx b/packages/wallet-widget/src/views/Send/SendCoin.tsx
index 51bdd0b8d..cd88b5176 100644
--- a/packages/wallet-widget/src/views/Send/SendCoin.tsx
+++ b/packages/wallet-widget/src/views/Send/SendCoin.tsx
@@ -35,11 +35,11 @@ import { useEffect, useRef, useState, type ChangeEvent } from 'react'
import { encodeFunctionData, formatUnits, parseUnits, toHex, zeroAddress, type Hex } from 'viem'
import { useAccount, useChainId, useConfig, usePublicClient, useSwitchChain, useWalletClient } from 'wagmi'
-import { WalletSelect } from '../../components/Select/WalletSelect.js'
+import { ConnectedWalletSelect } from '../../components/Select/ConnectedWalletSelect.js'
import { SendItemInfo } from '../../components/SendItemInfo.js'
import { TransactionConfirmation } from '../../components/TransactionConfirmation.js'
import { EVENT_SOURCE, EVENT_TYPES } from '../../constants/analytics.js'
-import { ERC_20_ABI, HEADER_HEIGHT_WITH_LABEL } from '../../constants/index.js'
+import { ERC_20_ABI } from '../../constants/index.js'
import { useNavigationContext } from '../../contexts/Navigation.js'
import { useNavigation, useSettings } from '../../hooks/index.js'
import { computeBalanceFiat, isEthAddress, limitDecimals } from '../../utils/index.js'
@@ -321,13 +321,7 @@ export const SendCoin = ({ chainId, contractAddress }: SendCoinProps) => {
}
return (
-