getNFTS for contract

this is returning one error or another
header.ts initializes moralis

  ngOnInit(): void {

    Moralis.serverURL = '***';

this returns some error code or another
Cannot read properties of undefined (reading ‘appId’) when I include start

Web3Api not initialized, run Moralis.start() first
when I use await Moralis.enable();

Moralis.enable() is deprecated and will be removed, use Moralis.enableWeb3()

you guys just told use to use Moralis.enable a month ago, now it’s enableWeb3?

  public GET_AUCTION_NFTS(): Promise<any>{
    return new Promise(async (resolve, reject)=>{
      try {

        await Moralis.start()
        const options = { chain: '0x61', address:TEASHOP, token_address: NFT };
        const NFTS = await Moralis.Web3API.account.getNFTsForContract(options);


      } catch (error) {


works with
const appId = "*";
const serverUrl = 'https://
Moralis.start({ serverUrl, appId });

NOT Moralis.initialize
you are making breaking changes, we don’t know about


I already showed you the right way of initialization your app in the discord. You have it in your second message.

This is not a breaking change you still can use the previous init method. Also we added this new syntax for app initialization about month ago

Moralis.Web3.enable() => Moralis.enable() => Moralis.enableWeb3()

And you still can use outdated syntax.

Moralis.enable() is deprecated and will be removed, use Moralis.enableWeb3() is a warning for devs to update the syntax. We usually don’t do any breaking changes

1 Like