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

[BUG REPORT] JSONRPCProvider received an instance of AbortSignal #85

Closed
AlburIvan opened this issue Feb 28, 2023 · 2 comments
Closed

[BUG REPORT] JSONRPCProvider received an instance of AbortSignal #85

AlburIvan opened this issue Feb 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@AlburIvan
Copy link

AlburIvan commented Feb 28, 2023

Describe the bug

Currently trying to implement a simple RPC call to getBalance (and others), but I get the error below whenever I try to invoke said functionalities.

TypeError [ERR_INVALID_ARG_TYPE]: The "emitter" argument must be an instance of EventEmitter or EventTarget. Received an instance of AbortSignal

It's similar to #74 and #75, but those didn't have a solution for the problem itself

To Reproduce
Steps to reproduce the behavior:

import { JsonRpcProvider } from '@pokt-foundation/pocketjs-provider'

const rpcUrl = 'https://mainnet.gateway.pokt.network/v1/lb/<PORTAL_ID>'

const dispatchers = [
  'https://node001.<REDACTED>.org',
  'https://node002.<REDACTED>.org'
]

const provider = new JsonRpcProvider({
  rpcUrl,
  dispatchers,
})

const balance = await simpleProvider.getBalance(
  'a8b23ebca16cde7f0a02b59db0eff9bea2300d4e',
);

Expected behavior
Get balance (or any other action) from said address

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS
  • Environment: Node
  • Version: tested in v16.9.0 and v18.14.2
  • Library Version: ^2.1.0

Additional context
Am I missing something here?

@AlburIvan AlburIvan added the bug Something isn't working label Feb 28, 2023
@github-actions
Copy link

Thanks for creating your first issue on this repo! A contributor will soon help you out.

@msmania
Copy link
Contributor

msmania commented Mar 27, 2024

Closing this issue as no repro on my end. If you're still having the same issue with the latest version, please feel free to reopen this.

Please note that the endpoint under mainnet.gateway.pokt.network is no longer valid. You can get a POKT endpoint through a gateway (Nodies or Grove). See more details here.

@msmania msmania closed this as completed Mar 27, 2024
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

2 participants