[SOLVED] MoralisWeb3Api.js:369 Uncaught (in promise) Error: address is not a valid hex address

I am trying to authenticate and check the current chain balance. but I am getting errors.

const connect = async () => {
    if (!isAuthenticated) {
      await Moralis.authenticate({
        signingMessage: "Log in using Moralis",
      })
      .then( function (user) {
        console.log("logged in user:", user);
         setNewaccount(user.get('accounts')[0])
         console.log(user.get('accounts')[0])
         if (user.get('accounts')[0]) {
          try {
            const options = { chain: "mumbai", address:user.get('accounts')[0] };
            const balances =  Moralis.Web3API.account.getTokenBalances(options)
            console.log(balances)
          } catch (error) {
            console.log(error)
          }
         }
        })
        .catch(function (error) {
          console.log(error);
          toast.error(error.message);
        });
    }
  }

check what is that Newaccount value there

Newaccount value was empty now i have fixed it. but i am getting this result instead of token balance - Promise {<pending>}

You may have to resolve that promise or to use await

after using await or resolving promise i am getting this result

That looks like no result was found for those particular parameters

What should I do to check the balance? I want to check the current chain and current address balance.

You want to check the native balance? Like eth, bnb?

Hi, thanks for your help. Now I am using moralis web3apis for balance checking. my problem is solved.