Closed Lbqds closed 1 year ago
Awesome work, thanks! :fire:
After we have the event subscription to the backend, there potentially is a small UX issue:
Since everything is asynchronous, after we list/unlist a collection, there might be a lag between user finishing the tx and API returning the matching state. Concretely, a user might cancel a listing for a NFT and then go to my NFT page, still seeing the NFT being listed even after refresh. There are potentially a few ways to address it but maybe we should have a discussion about it.
After we have the event subscription to the backend, there potentially is a small UX issue:
Since everything is asynchronous, after we list/unlist a collection, there might be a lag between user finishing the tx and API returning the matching state. Concretely, a user might cancel a listing for a NFT and then go to my NFT page, still seeing the NFT being listed even after refresh. There are potentially a few ways to address it but maybe we should have a discussion about it.
Indeed, perhaps we can start by reducing the polling interval here(currently 100s). But this doesn't solve the fundamental issue. Maybe we should consider the following approachs when a user queries my-nfts
:
NFTListing
contract based on the NFT id. But this approach might be slow if the user has numerous NFTs.BTW, even if our full node has WebSocket support, is it possible that similar situations could arise due to latency?
Maybe we should consider the following approachs when a user queries my-nfts:
- Sync events from the full node
- Check the existence of the NFTListing contract based on the NFT id. But this approach might be slow if the user has numerous NFTs.
Yeah, maybe we should try to sync if we discover that the events are not caught up. If the events has catched up I guess we don't need to check the existence of the NFTListings contract. WDYT?
BTW, even if our full node has WebSocket support, is it possible that similar situations could arise due to latency?
Yeah we will have the same issue, to a lesser extent I guess.
If the events has catched up I guess we don't need to check the existence of the NFTListings contract. WDYT?
Sounds good to me!
If the events has catched up I guess we don't need to check the existence of the NFTListings contract. WDYT?
Sounds good to me!
Do you think this commit looks ok?
Do you think this commit looks ok?
LGTM 👍
Close since everything is in https://github.com/alephium/alephium-nft/pull/28 now
Now we can run NFT on the devnet using the following commands:
./build-docker-images devnet
cd docker && docker compose up -d
yarn && yarn run deploy:contracts