vegaprotocol / data-node

A rich API server for Vega Protocol
https://vega.xyz
Other
3 stars 1 forks source link

Error when retrieving rewards for parties #688

Closed MuthuVega closed 2 years ago

MuthuVega commented 2 years ago

Get the below error when retrieving reward details fro parties

Query:

query {
  parties {
    id
    accounts {
      type
      asset {
        id
      }
      balance
    }
    rewardSummaries {
      asset {
        id
      }
      amount
    }
    rewards {
      asset {
        id
      }
      amount
      rewardType
      percentageOfTotal
      epoch {
        id
      }
    }
  }
}

Response:

{
  "errors": [
    {
      "message": "failed to convert AccountType from GraphQL to Proto: ACCOUNT_TYPE_FEES_INFRASTRUCTURE",
      "path": [
        "parties",
        2,
        "rewards",
        17,
        "rewardType"
      ]
    },
    {
      "message": "failed to convert AccountType from GraphQL to Proto: ACCOUNT_TYPE_FEES_INFRASTRUCTURE",
      "path": [
        "parties",
        2,
        "rewards",
        1,
        "rewardType"
      ]
    },
    {
      "message": "failed to convert AccountType from GraphQL to Proto: ACCOUNT_TYPE_FEES_INFRASTRUCTURE",
      "path": [
        "parties",
        2,
        "rewards",
        2,
        "rewardType"
      ]
    },
pscott31 commented 2 years ago

I believe this was fixed in this pr. The above query works for me now at least:

Image

MuthuVega commented 2 years ago

Retested and working fine.