Connects and disconnects the wallet, and reports that transition. connect takes no argument: the picker chooses the wallet, so there is no mode to pass. Wagmi: useConnect + useDisconnect, bundled because one provider owns the session.
connect
useConnect
useDisconnect
with no CantonConnectProvider above it, as every hook here does.
const { connect, isConnecting } = useConnect()<button onClick={() => void connect().catch(() => undefined)} disabled={isConnecting}> Connect</button> Copy
const { connect, isConnecting } = useConnect()<button onClick={() => void connect().catch(() => undefined)} disabled={isConnecting}> Connect</button>
Connects and disconnects the wallet, and reports that transition.
connecttakes no argument: the picker chooses the wallet, so there is no mode to pass. Wagmi:useConnect+useDisconnect, bundled because one provider owns the session.