useAccount

This hook provides data regarding the connected account.

Usage

import { useAccount } from '@nazeeh2000/comp-kit'

const Comp = () => {
  const { address, isConnected } = useAccount();
  
  return (
  // Your component
  )
}

Return values

const {
      address,
      connecting,
      error,
      status, // 'connecting' | 'connected' | 'disconnected' | 'error'
      isConnected,
      disconnectWallet,
      walletProvider, // shows which wallet provider is connected e.g. MetaMask or WalletConnect
} = useAccount()

Last updated