You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know why the CORS issues happens, but the CORS configuration is definitely correct (otherwise nobody would be able to use TronGrid from any dApp).
About your empty result example, you are putting together parameters that are not compatible. Specifically, latest is not recognized in that format.
I create some listeners to handle event emitted from Smart Contract and error happens:
Access to XMLHttpRequest at 'https://api.trongrid.io/event/contract/TGRcjrgNX2w3yJ8HZkGVEZAxza7fJSTSXB/LoseBet/latest?size=20&page=1&since=1560624083457&fromTimestamp=1560624083457&sort=block_timestamp' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
https://api.trongrid.io/event/contract/TGRcjrgNX2w3yJ8HZkGVEZAxza7fJSTSXB/LoseBet/latest?size=20&page=1&since=1560624083457&fromTimestamp=1560624083457&sort=block_timestamp
Return empty Array
But when I manually change to
https://api.trongrid.io/event/contract/TGRcjrgNX2w3yJ8HZkGVEZAxza7fJSTSXB/LoseBet/?fromTimestamp=1560624083457&sort=block_timestamp
it returns data
You can check because this is on MAINNET. Thanks
The text was updated successfully, but these errors were encountered: