import { Menu } from '@headlessui/react' import { ChevronDownIcon, ChevronUpIcon, CheckCircleIcon, } from '@heroicons/react/outline' import useWalletStore from '../stores/useWalletStore' import { WALLET_PROVIDERS, DEFAULT_PROVIDER } from '../hooks/useWallet' import useLocalStorageState from '../hooks/useLocalStorageState' export default function WalletSelect({ isPrimary = false }) { const setWalletStore = useWalletStore((s) => s.set) const [savedProviderUrl] = useLocalStorageState( 'walletProvider', DEFAULT_PROVIDER.url ) const handleSelectProvider = (url) => { setWalletStore((state) => { state.providerUrl = url }) } return ( {({ open }) => ( <> {open ? ( ) : ( )} {WALLET_PROVIDERS.map(({ name, url, icon }) => ( ))} )} ) }