fudgebucket27 / Lexplorer

Loopring explorer alternative
14 stars 10 forks source link

account nft slots no longer in latest order #258

Closed fudgebucket27 closed 1 year ago

fudgebucket27 commented 1 year ago

There has been a change to the subgraph we are using https://github.com/juanmardefago/loopring-subgraph-v2/commit/514ad7ccdf51968980cd6d9d4cb12263ae2bc368 this seems to be affecting the ordering of the account nft slots. They are not in order of most recent anymore...

fudgebucket27 commented 1 year ago

My account for example: fudgey.eth

fudgebucket27 commented 1 year ago

Another one: https://lexplorer.io/account/35613

modersohn commented 1 year ago

From what I understand, we initially wanted to order by lastUpdatedAt because updating a slot would move them to the top. That never happened, because the graph wasn't updating lastUpdatedAt - now it does!

The question really is what ordering is preferable. And to answer that, one would need to know quite a few things (which I don't!):

  1. Can a slot be re-used?
    1. Only for the same NFT or also for another?
    2. To answer that, one would need to know how tokenID is generated (those numbers above 32767)
    3. This is not generated in the graph, but extracted from the chain
    4. So AFAICS the relayer generates that and that's closed source
    5. But let's just assume you send out an NFT and get it back later - surely you'd expect it to move to the top of the list then?
  2. What updates a slot without clearing an NFT?
    1. Obviously if the balance changes without becoming 0
    2. i.e. you're getting another one or you had more than one and send one off
    3. Personally, I would expect such a change to move the NFT to the top of the list.
  3. Can you actually make sense of the modified ordering? Maybe it does make sense?
modersohn commented 1 year ago

Just had a chat with Leppaludi on discord and he heard people wonder why newly bought NFTs appeared at the very back of their wallet - which really seems to suggest that tokenIDs and therefore slots can be reused. If that's the case that would be a strong argument to keep the sorting by lastUpdatedAt!

fudgebucket27 commented 1 year ago

Ah right then. Wouldn’t createdAt act basically as when the nft was received then? I noticed for NFTs minted an X amount of times whenever they are transferred would push these to the top of the list for the wallet holding them which I’m not sure is what we want to happen.

On Tue, 30 Aug 2022 at 8:33 pm, modersohn @.***> wrote:

Just had a chat with Leppaludi on discord and he heard people wonder why newly bought NFTs appeared at the very back of their wallet - which really seems to suggest that tokenIDs and therefore slots can be reused. If that's the case that would be a strong argument to keep the sorting by lastUpdatedAt!

— Reply to this email directly, view it on GitHub https://github.com/fudgebucket27/Lexplorer/issues/258#issuecomment-1231479916, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIDWT53YU3VVYG2AZN6GB3V3XPPFANCNFSM5773TD6A . You are receiving this because you authored the thread.Message ID: @.***>

modersohn commented 1 year ago

createdAt would be the first time that account had an NFT with that tokenID.

If you change perspective: if you received another copy of the same NFT, would you expect it to move up the list? If yes, then why not if you send it? But that is all mood if tokenIDs and therefore slots get reused - as it seems. Then you most definitely do NOT want to sort by createdAt because a newly received NFT ends up somewhere in the back - exactly as Leppaludi mentioned.

fudgebucket27 commented 1 year ago

Ahhhhh that makes a lot more sense then. I’m happy with that.

On Tue, 30 Aug 2022 at 8:52 pm, modersohn @.***> wrote:

createdAt would be the first time that account had an NFT with that tokenID.

If you change perspective: if you received another copy of the same NFT, would you expect it to move up the list? If yes, then why not if you send it? But that is all mood if tokenIDs and therefore slots get reused - as it seems. Then you most definitely do NOT want to sort by createdAt because a newly received NFT ends up somewhere in the back - exactly as Leppaludi mentioned.

— Reply to this email directly, view it on GitHub https://github.com/fudgebucket27/Lexplorer/issues/258#issuecomment-1231498446, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIDWT34GIYCR6YLDPJHFE3V3XRXFANCNFSM5773TD6A . You are receiving this because you authored the thread.Message ID: @.***>