nevermined-io/node

The `nft-access` flow is not working without the agreementId

Closed this issue · 0 comments

Is your feature request related to a problem? Please describe.

In the previous gateway it was possible to call the /nft-access endpoint without an agreementId or agrementId = 0x. When that was happening the gateway was checking if the user sending the request was the owner (erc721) or was having balance (erc1155) for a specific DID/NFT Contract

Code of the old gateway here:
https://github.com/nevermined-io/gateway/blob/master/nevermined_gateway/identity/oauth2/token.py#L333

That functionality is missed in the current gateway and probably was lost during the migration

Also the contract address to check this must come from the DDO and not assume it's used the nftUpgradeable or nft721Upgradeable instances

Describe the solution you'd like

To have that functionality back

Additional context

Add any other context or screenshots about the feature request here.