Moralis.Web3.getNFTs broken for avalanche

This issue doesn’t happen for Eth, Rinkeby, or Fantom networks. But when I try to call it for Avalanche or Avalanche testnet, like this: Moralis.Web3.getNFTs({ chain: "avalanche testnet", address: address });

I get this error:

Anyone know what the issue is?

do you have an example of an address that has NFTs on avalanche to test?

you should use x = await Moralis.Web3API.account.getNFTs({address: 'address', chain: 'avalanche'}) instead of Moralis.Web3.getNFTs

1 Like

Add This library to get WEB3API
import { useMoralis, useMoralisWeb3Api } from "react-moralis";

const {Web3API} = useMoralisWeb3Api();
    const options = {
      chain: "avalanche testnet",
      address: user.get("ethAddress") // User address
    };

    const userNFTs = await Web3API.account.getNFTs(options);
1 Like

Hi @rikudousennin

Where did you find this outdated syntax?