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

Invalid type for block transactions #7090

Closed
sharifzadesina opened this issue Jun 7, 2024 · 3 comments
Closed

Invalid type for block transactions #7090

sharifzadesina opened this issue Jun 7, 2024 · 3 comments
Assignees
Labels
4.x 4.0 related Bug Addressing a bug

Comments

@sharifzadesina
Copy link

sharifzadesina commented Jun 7, 2024

Expected behavior

The eth.getBlock().transactions should either return empty array in case of empty block, or include undefined as part of its return type.

Actual behavior

import { Web3 } from "web3";

const web3 = new Web3('https://sepolia.infura.io/v3/xxxxxx');

const block = await web3.eth.getBlock(6058307, true);

console.log(block.transactions); // this is undefined!

Steps to reproduce the behavior

  1. use web3.eth.getBlock on an empty block.

Logs

Doesn't matter.

Environment

Doesn't matter.

@SantiagoDevRel SantiagoDevRel added the 4.x 4.0 related label Jun 11, 2024
@SantiagoDevRel
Copy link
Member

Hi @sharifzadesina thanks for submitting this, you are right, the taem will work on it soon! thanks

@mconnelly8 mconnelly8 added the Bug Addressing a bug label Jun 25, 2024
@luu-alex luu-alex self-assigned this Jul 12, 2024
@luu-alex luu-alex mentioned this issue Jul 15, 2024
17 tasks
@luu-alex
Copy link
Contributor

Created a PR for this, thanks

@luu-alex
Copy link
Contributor

merged. will be available next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

4 participants