Skip to content

BlockResponse class incorrectly modeled #846

@SilentRhetoric

Description

@SilentRhetoric

Subject of the issue

The BlockResponse.from_obj_for_encoding() returns a class object that has incorrect typing.

  • Software version: 2.7.0

Steps to reproduce

const blockRespRaw = algodClient.block(12345).do()

const incorrectTypedBlockResponse = modelsv2.BlockResponse.from_object_for_encoding(blockResponseRaw)

Expected behaviour

Passing the algodClient.block() through modelsv2.BlockResponse.from_obj_for_encoding() should produce an object in which the block property is a Block and not a BlockHeader.

Actual behaviour

Instead, the block property of the BlockResponse class is typed as a BlockHeader and thus does not allow accessing the rest of the block contents.

public block: BlockHeader;

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-bugBug report that needs triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions