alchemy-sdk-js icon indicating copy to clipboard operation
alchemy-sdk-js copied to clipboard

Cannot read properties of undefined (reading 'safelistRequestStatus')

Open ivanpochta opened this issue 1 year ago • 1 comments

[REQUIRED] Environment

  • Alchemy SDK version: 3.2.0

[REQUIRED] Describe the problem

I have the code snippet:

this.alchemy = new Alchemy({
    url: this.NETWORK_RPC_URL,
  });

return await this.alchemy.nft.getNftsForOwner(address, {
  omitMetadata: false,
});

This throws the error: Cannot read properties of undefined (reading 'safelistRequestStatus') . I figured out that it's related to OpenSea metadata parsing and most likely someone forgot smth like: rawNftContract.openSeaMetadata**?**.safelistRequestStatus in src/utils/util.ts.

How to reproduce:

this.alchemy = new Alchemy({
      url: this.NETWORK_RPC_URL,
    });

return await this.alchemy.nft.getNftsForOwner(address, {
  omitMetadata: false,
});

ivanpochta avatar Apr 02 '24 16:04 ivanpochta

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs

github-actions[bot] avatar May 03 '24 01:05 github-actions[bot]

@thebrianchen Can someone please escalate this issue. There is an open PR for the same as well. Thanks in advance 🙏

cc: @bmoyroud @kidrew @SahilAujla @noam-alchemy

nirmit1509 avatar May 08 '24 08:05 nirmit1509

Sorry for the delay. This fix has been applied and published in v3.3.1.

thebrianchen avatar May 08 '24 16:05 thebrianchen

@thebrianchen The comparison with null was also wrong. Can you please fix this as well. https://github.com/alchemyplatform/alchemy-sdk-js/pull/432

nirmit1509 avatar May 08 '24 16:05 nirmit1509

@thebrianchen The comparison with null was also wrong. Can you please fix this as well. https://github.com/alchemyplatform/alchemy-sdk-js/pull/432

anthhub avatar Jun 09 '24 18:06 anthhub

@anthhub @nirmit1509 Sorry for the delay in not fixing this. This is now fixed in v3.4.1.

thebrianchen avatar Aug 14 '24 19:08 thebrianchen