MoralisWeb3 / react-moralis

Hooks and components to use Moralis in a React app
MIT License
624 stars 166 forks source link

Invalid Function getNativeBalance when trying to use the newly added Web3API feature #12

Closed randomw1zard closed 3 years ago

randomw1zard commented 3 years ago

{"code":141,"error":"Invalid function: \"getNativeBalance\""}

Any help will be highly appreciated, thanks in advance.

import React from 'react' import { useMoralis,useMoralisWeb3Api, useMoralisWeb3ApiCall } from "react-moralis" const Charts = () => { const { native: { getBlock }, account: { getNativeBalance } } = useMoralisWeb3Api();

const getNativeBalanceQuery = useMoralisWeb3ApiCall(getNativeBalance, { address:"0xaA44AAEf36D866BA4fe9Def5d11426B9A87115E1", });

const {authenticate, logout, isAuthenticated,authError, hasAuthError,user, enableWeb3,isAuthenticating, isWeb3Enabled, Moralis, web3} = useMoralis()

return (

{isAuthenticated && isWeb3Enabled ? <> : null}

) }

export default Charts

randomw1zard commented 3 years ago

Moralis server wasn't updated. Issue closed thanks!