keep-starknet-strange / art-peace

Competitive art canvas on Starknet
https://art-peace.net
MIT License
15 stars 47 forks source link

[feat] Send WS message on NFT mint event #92

Closed b-j-roberts closed 1 month ago

b-j-roberts commented 2 months ago

After minting an NFT onchain, the indexer will add the NFT's data to Postgres. If users have the NFTs tab open, they must refresh to get the new NFT data from the backend.

This issue is to add a websocket message for NFT mints on the indexer backend. This message will send all the connected clients a message containing the token_id of the NFT minted so they can request the NFT's data.

Once receiving the websocket message on the frontend client, you should use the received token_id value to request the NFT from the backend ( if NFTs tab is open ) and add it to the appropriate NFT lists.

References

b-j-roberts commented 2 months ago

Thanks for volunteering for this issue @raizo07

Please comment here so I can assign you, if you're still interested.

raizo07 commented 2 months ago

Yes I'm here, kindly assign.