Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
getBalance
import { useDynamicContext } from '@dynamic-labs/sdk-react-core' const { primaryWallet } = useDynamicContext() const [balance, setBalance] = useState(null) useEffect(() => { const fetchBalance = async () => { if (primaryWallet) { const value = await primaryWallet.getBalance() setBalance(value) } } fetchBalance() }, [primaryWallet]) return <p>{balance}</p>
Was this page helpful?