Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiles owners are not updated when the estate ownership changes #96

Open
LautaroPetaccio opened this issue Jul 28, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@LautaroPetaccio
Copy link
Contributor

The /v2/tiles endpoints returns, for the tile in the coordinates -69,-33 the following:

{
  "id": "-69,-33",
  "x": -69,
  "y": -33,
  "updatedAt": 1583360810,
  "type": "owned",
  "top": true,
  "left": false,
  "topLeft": false,
  "name": "Stuff",
  "estateId": "2704",
  "owner": "0x4eac6325e1dbf1ac90434d39766e164dca71139e",
  "tokenId": "115792089237316195423570985008687907830130783715016748523948110702552891260895"
}

Which means the this tile belongs to the estate 2704 and its owner is the one with the address 0x4eac6325e1dbf1ac90434d39766e164dca71139e, but this is not right.

By using the Marketplace playground, with the query:

{
  nfts(
    where: {tokenId: "115792089237316195423570985008687907830130783715016748523948110702552891260895"}
  ) {
    owner {
      address
    }
  }
}

We get that the owner of the parcel is the estate contract:

{
  "data": {
    "nfts": [
      {
        "owner": {
          "address": "0x959e104e1a4db6317fa58f8295f586e1a978c297"
        }
      }
    ]
  }
}

And by using again the playground with the query:

{
  estates(where: {tokenId: "2704"}) {
    owner {
      address
    }
  }
}

We get that the estate owner is the wallet with the address 0x5188e308fee25ac49c10f9fd9270d953c4822ce5, which differs from the 0x4eac6325e1dbf1ac90434d39766e164dca71139e address that is returned in the /v2/tiles endpoint.

{
  "data": {
    "estates": [
      {
        "owner": {
          "address": "0x5188e308fee25ac49c10f9fd9270d953c4822ce5"
        }
      }
    ]
  }
}

Check the atlas update function to see if a change in the ownership of an estate implies changing the ownership in the tiles entity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant