Hello,
When i pass the Moralis.Units.FromWei value into the useState, i get this error in the console.
Uncaught (in promise) TypeError: setBalanceCheck is not a function
Here is the my code;
const fetchNativeBalance = async () => {
const options = {
chain: chainId,
};
const balanceNative = await Web3Api.account.getNativeBalance(options);
const userBalanceToWei = Moralis.Units.FromWei(balanceNative.balance);
console.log(typeof userBalanceToWei);
setBalanceCheck(userBalanceToWei); }
Thanks for any help!