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

indexer-common: query fee explicitly check for numeric type #437

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

hopeyen
Copy link
Contributor

@hopeyen hopeyen commented Jul 8, 2022

action: "ClaimMany"
    err: {
      "type": "IndexerError",
      "message": "Failed to claim allocation",
      "stack":
          IndexerError: Failed to claim allocation
              at indexerError (/opt/indexer/packages/indexer-common/dist/errors.js:143:12)
              at Network.<anonymous> (/opt/indexer/packages/indexer-common/dist/network.js:993:60)
              at Generator.next (<anonymous>)
              at fulfilled (/opt/indexer/packages/indexer-common/dist/network.js:5:58)
              at runMicrotasks (<anonymous>)
              at processTicksAndRejections (node:internal/process/task_queues:96:5)
      "code": "IE016",
      "explanation": "https://github.com/graphprotocol/indexer/blob/master/docs/errors.md#ie016",
      "cause": {
        "type": "TypeError",
        "message": "_a.gt is not a function",
        "stack":
            TypeError: _a.gt is not a function
                at /opt/indexer/packages/indexer-common/dist/network.js:969:124
                at Array.sort (<anonymous>)
                at Network.<anonymous> (/opt/indexer/packages/indexer-common/dist/network.js:969:22)
                at Generator.next (<anonymous>)
                at fulfilled (/opt/indexer/packages/indexer-common/dist/network.js:5:58)
                at runMicrotasks (<anonymous>)
                at processTicksAndRejections (node:internal/process/task_queues:96:5)
      }

Unable to reproduce this on testnet but maybe it was because JS lost the bigNumber type for queryFeesCollected: BigNumber | undefined...? Maybe we should explicitly checking for type

Copy link
Contributor

@fordN fordN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hopeyen hopeyen merged commit ced822c into main Jul 18, 2022
@hopeyen hopeyen deleted the hope/bigNumber_gt_function branch July 18, 2022 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants