Mobile (WalletConnect)

disconnect

End the active WalletConnect session.

disconnect ends the active session, if there is one. Joey removes your app from its list of connected apps.

const { actions } = useProvider();
await actions.disconnect();

Example

'use client';

import { useProvider } from './provider';

export function DisconnectButton() {
  const { actions, session } = useProvider();
  if (!session) return null;

  return <button onClick={() => actions.disconnect()}>Disconnect</button>;
}