Skip to content

Commit

Permalink
disconnect button
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarnadas committed Feb 6, 2024
1 parent 1251f7e commit b715d3e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function App() {
const [delegateSigner, setDelegateSigner] = useState<DelegateSignerResponse>();
const [orderlyKey, setOrderlyKey] = useState<Uint8Array>();

const [{ wallet }, connectWallet] = useConnectWallet();
const [{ wallet }, connectWallet, disconnectWallet] = useConnectWallet();
const [{ connectedChain }, setChain] = useSetChain();

useEffect(() => {
Expand Down Expand Up @@ -161,6 +161,14 @@ function App() {
/>
OP Sepolia
</DropdownMenu.Item>
<DropdownMenu.Separator />
<DropdownMenu.Item
onSelect={() => {
disconnectWallet({ label: wallet.label });
}}
>
Disconnect
</DropdownMenu.Item>
</DropdownMenu.Content>
</DropdownMenu.Root>
) : (
Expand Down

0 comments on commit b715d3e

Please sign in to comment.