[react] Problems moving function from Ethers/Web3modal to Moralis

I have a function here I wrote in using ethers and web3modal.

  async function loadMyNFTs() {
    const web3Modal = new Web3Modal({
      network: "mainnet",
      cacheProvider: true,
    });
    const connection = await web3Modal.connect();
    const provider = new ethers.providers.Web3Provider(connection);
    const signer = provider.getSigner();

    const marketContract = new ethers.Contract(
      nftmarketaddress,
      Market.abi,
      signer
    );
    const tokenContract = new ethers.Contract(nftaddress, NFT.abi, provider);
    const mdata = await marketContract.fetchMyNFTs();

    const mitems = await Promise.all(
      mdata.map(async (mi) => {
        const tokenUri = await tokenContract.tokenURI(mi.tokenId);
        const meta = await axios.get(tokenUri);
        let price = ethers.utils.formatUnits(mi.price.toString(), "ether");
        let mitem = {
          price,
          tokenId: Number(mi.tokenId),
          seller: mi.seller,
          owner: mi.owner,
          image: meta.data.image,
        };
        return mitem;
      })
    );
    setMyNfts(mitems);
    setMLoadingState("loaded");
  }

I attempted to rewrite this into Moralis like code but this isn’t working for me. Anyone know what I might be doing wrong?

async function loadMyNFTs() {
    const web3 = await Moralis.enableWeb3();
    const tokenContract = new web3.eth.Contract(NFT.abi, nftaddress);
    const marketContract = new web3.eth.Contract(Market.abi, nftmarketaddress);

    const mdata = await Moralis.executeFunction({
      contractAddress: nftmarketaddress,
      functionName: "fetchMyNFTs",
      abi: Market.abi,
    });

    const mitems = await Promise.all(
      mdata.map(async (mi) => {
        const tokenUri = await Moralis.executeFunction({
          contractAddress: nftaddress,
          functionName: "tokenURI",
          abi: NFT.abi,
          params: {
            tokenId: Number(mi.tokenId),
          },
        });

        const meta = await axios.get(tokenUri);
        let price = web3.utils.fromWei(mi.price.toString(), "ether");
        let mitem = {
          price,
          name: meta.data.name,
          description: meta.data.description,
          tokenId: Number(mi.tokenId),
          seller: mi.seller,
          owner: mi.owner,
          sold: mi.sold,
          image: meta.data.image,
        };
        return mitem;
      })
    );

    setMyNfts(mitems);
    setMLoadingState("loaded");
  }

With the Moralis code, I usually only get [] object for mdata, but occasionally its a random array with 1 item. Seems like I am missing something here. Thanks

does this make a .send or a .call request?

I believe it is a call method, its read only operation

can you check in your blockchain if it did a call or a transaction?

yep call.

eth_call
  Contract call:       NFTMarket#fetchMyNFTs
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0

when you look on your local blockchain, is there any difference that you see if you use ethers or Moralis.executeFunction when you call fetchMyNFTs function?