User wallet address in function

I am trying to use this:

const { runContractFunction, data, error, isLoading, isFetching } =
        address: contrAddress,
        functionName: "getUserDepositHistory",
        chain: "mumbai",
        abi: Abi,
        params: {
          _user: JSON.stringify(account),
          _numBack: 1,

This is a contract function that requires parameters “_user”, and “_numBack”. How can i pass the users wallet address into the _user parameter? account by itself just doesn’t seem to work for me. Any way to access the address from a function?

Try using Moralis.User.current().get("ethAddress")

Have tried this and can’t seem to get it to even display, every time I place it on the page it doesn’t render.

I am using account variable from

  const { authenticate, isAuthenticated, account, chainId, logout } =

When using the “account” variable in the page it does show the wallet address but not when I use it in the parameters.

Can you log Moralis.User.current().get("ethAddress") or account?

console.log(account); logs the address correctly. (Can also use within html to return wallet address it just doesn’t work when used in the function).

console.log(Moralis.User.current().get(“ethAddress”)) makes the page not render at all, nothing notable shown in the console.

Not sure if needed at all but maybe this could have some use. Here is the function used to connect the user to the site.

const { isWeb3Enabled, enableWeb3, isAuthenticated, isWeb3EnableLoading } =


  useEffect(() => {

    const connectorId = window.localStorage.getItem("connectorId");

    if (isAuthenticated && !isWeb3Enabled && !isWeb3EnableLoading)

      enableWeb3({ provider: connectorId });

    // eslint-disable-next-line react-hooks/exhaustive-deps

  }, [isAuthenticated, isWeb3Enabled]);

Ok, so do you get an error or anything? No reason that shouldn’t work unless the use of useApiContract isn’t correct.

Am getting errors as page isn’t loading while using
I think this is the error (from console):
Uncaught Error: You need to call Moralis.start with an applicationId before using Moralis.

the function works when i use an address within quotes, or set a variable to a actual 0x address string and use that but not when using the account variable so I think that the function must be correct.