envoylabs / whoami

An NFT-based user and smart contract nameservice
Apache License 2.0
16 stars 10 forks source link

Why does PathsForToken require owner? #72

Open the-frey opened 2 years ago

the-frey commented 2 years ago

Seems redundant as the lookup is independent of owner. Should look into it and remove that if possible.

the-frey commented 2 years ago

Paths under a token might have multiple owners, so probably this is actually a case of needing multiple ways to look this up (i.e. one where not passing an owner results in all being returned)

the-frey commented 2 years ago

Ah, it's also because they're filtered in the lookup query that's run via CW storage. That can be changed, though.

the-frey commented 2 years ago

Paths under a token might have multiple owners, so probably this is actually a case of needing multiple ways to look this up (i.e. one where not passing an owner results in all being returned)

This makes me think that this issue is more correctly "Add a new query handler that returns all paths below token id blah, regardless of owner"

the-frey commented 2 years ago

We don't currently require such a thing, but it seems like something clients would quite quickly want...