diff --git a/wallets/react-wallet-v2/src/components/AccountPicker.tsx b/wallets/react-wallet-v2/src/components/AccountPicker.tsx index ba5cbe9..11aa8a9 100644 --- a/wallets/react-wallet-v2/src/components/AccountPicker.tsx +++ b/wallets/react-wallet-v2/src/components/AccountPicker.tsx @@ -1,8 +1,15 @@ -export default function AccountPicker() { +import { ReactEventHandler } from 'react' + +interface IProps { + value: number + onChange: ReactEventHandler +} + +export default function AccountPicker({ value, onChange }: IProps) { return ( - + + ) } diff --git a/wallets/react-wallet-v2/src/pages/index.tsx b/wallets/react-wallet-v2/src/pages/index.tsx index 2bfa119..1d53a82 100644 --- a/wallets/react-wallet-v2/src/pages/index.tsx +++ b/wallets/react-wallet-v2/src/pages/index.tsx @@ -5,23 +5,24 @@ import { EIP155_MAINNET_CHAINS, EIP155_TEST_CHAINS } from '@/data/EIP155Data' import SettingsStore from '@/store/SettingsStore' import { wallets } from '@/utils/WalletUtil' import { Text } from '@nextui-org/react' -import { Fragment } from 'react' +import { Fragment, useState } from 'react' import { useSnapshot } from 'valtio' export default function HomePage() { + const [account, setAccount] = useState(0) const { testNets } = useSnapshot(SettingsStore.state) const addresses = Object.keys(wallets) return ( - + setAccount(Number(e.currentTarget.value))} /> Mainnets {Object.values(EIP155_MAINNET_CHAINS).map(({ name, logo, rgb }) => ( - + ))} {testNets ? ( @@ -30,7 +31,13 @@ export default function HomePage() { Testnets {Object.values(EIP155_TEST_CHAINS).map(({ name, logo, rgb }) => ( - + ))} ) : null}