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

BlockResponse class incorrectly modeled #846

Open
SilentRhetoric opened this issue Dec 25, 2023 · 1 comment
Open

BlockResponse class incorrectly modeled #846

SilentRhetoric opened this issue Dec 25, 2023 · 1 comment
Labels
new-bug Bug report that needs triage

Comments

@SilentRhetoric
Copy link

SilentRhetoric commented Dec 25, 2023

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;

@SilentRhetoric SilentRhetoric added the new-bug Bug report that needs triage label Dec 25, 2023
@jasonpaulos
Copy link
Member

Good point, this type is not accurate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bug Bug report that needs triage
Projects
None yet
Development

No branches or pull requests

2 participants