useBalance

Returns the account balance for the current chain.

Usage

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

const Comp = () => {
 const { balance, fetching, error, etherBalance } = useBalance({
    address,
    // all the other parameters you can pass to `getBalance` from viem
    // example: blockTag: 'latest'
  });
  
  return (
  // Your component
  )
}

You can pass all the parameters from getBalance hook of viem to the above useBalance hook.

Last updated