Bug with EIP721 Token URI updates
VY5FR2NWJ9 opened this issue · 0 comments
Hi all (or @Amxx),
I've found a bug in the EIP721 code, related to token URI's not being updated when they should be.
On each transfer() and approval() event, the subgraph calls the following function to retrieve the token from the graph-node's GraphQL store: here
However, this function only queries and saves the token URI in the event that the token entity is not already found. In many cases, however, a token's URI can change; as the code currently stands, only the originally set token URI will ever be returned.
This should be as simple as always bind()
ing and checking the token URI when loading the token, so that the updated URI always gets saved back to the store.
I can create a PR to merge this change in and will attach it to this issue.