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

Error when getPastEvents called without options #2343

Closed
dmihal opened this issue Feb 8, 2019 · 1 comment
Closed

Error when getPastEvents called without options #2343

dmihal opened this issue Feb 8, 2019 · 1 comment

Comments

@dmihal
Copy link

dmihal commented Feb 8, 2019

Expected behavior

.getPastEvents('allEvents') returns an array of events.

Actual behavior

TypeError: Cannot read property 'fromBlock' of undefined

Method works fine if called with an empty object: .getPastEvents('allEvents', {})

Steps to reproduce the behavior

  1. Construct a Web3 contract
  2. Call contract.getPastEvents('allEvents')

Error Logs

(node:9157) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'fromBlock' of undefined
    at Object.inputLogFormatter (.../node_modules/web3-core-helpers/dist/web3-core-helpers.cjs.js:173:15)
    at AllPastEventLogsMethod.beforeExecution (.../node_modules/web3-core-method/dist/web3-core-method.cjs.js:1280:44)
    at AllPastEventLogsMethod._callee$ (.../node_modules/web3-core-method/dist/web3-core-method.cjs.js:445:22)

Versions

Node: 8.11.4
Web3: 1.0.0-beta.43

@nivida
Copy link
Contributor

nivida commented Feb 8, 2019

Thanks for creating this issue! But this got already fixed and will be released in version beta.44. (#2338)

@nivida nivida closed this as completed Feb 8, 2019
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

No branches or pull requests

2 participants