MoralisWeb3 / docs

Official documentation of Moralis Web3
https://docs.moralis.io
28 stars 123 forks source link

Feature request for: /streams-api/evm/mandatory-test-webhook #462

Closed 0xjluis closed 1 month ago

0xjluis commented 1 month ago

Moralis Test Webhook

Is your feature request related to a problem? Please describe. There's a discrepancy between the Moralis documentation (version 2.2) and the actual test webhook received when creating or updating a stream. This mismatch causes issues when validating and responding to these test webhooks.

Describe the solution you'd like Update the documentation to accurately reflect the current test webhook structure, or adjust the test webhook to match the existing documentation.

Describe alternatives you've considered As a temporary solution, I've adjusted my code to handle both structures (documented and actual). However, this is not ideal and could lead to future issues if the structure changes again without documentation updates.

Additional context Documented structure:

{  
  "abi": {},  
  "block": {  
    "hash": "",  
    "number": "",  
    "timestamp": ""
  },  
  "txs": [],  
  "txsInternal": [],  
  "logs": [],  
  "chainId": "",  
  "tag": "",  
  "streamId": "",  
  "confirmed": true,  
  "retries": 0,  
  "erc20Approvals": [],  
  "erc20Transfers": [],  
  "nftApprovals": [ ERC721: [], ERC1155: [] ],  
  "nftTransfers": []  
}

Actual received structure:

{
  "abi": [],
  "block": {
    "number": "",
    "hash": "",
    "timestamp": ""
  },
  "txs": [],
  "txsInternal": [],
  "logs": [],
  "chainId": "",
  "confirmed": true,
  "retries": 0,
  "tag": "",
  "streamId": "",
  "erc20Approvals": [],
  "erc20Transfers": [],
  "nftTokenApprovals": [],
  "nftApprovals": {
    "ERC721": [],
    "ERC1155": []
  },
  "nftTransfers": [],
  "nativeBalances": []
}

Key differences:

  1. abi is an empty array [] instead of an empty object {}.
  2. Additional fields: nftTokenApprovals and nativeBalances.
  3. Different structure for nftApprovals.
github-actions[bot] commented 1 month ago

Stale issue message