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

fix: make bitcoin payload serialization deserializable #569

Merged
merged 3 commits into from Apr 25, 2024

Conversation

MicaiahReid
Copy link
Collaborator

@MicaiahReid MicaiahReid commented Apr 24, 2024

When a Chainhook is triggered and we send a payload to a user, we filter some values based on user settings (include_proof, include_inputs, etc). This helps to reduce the payload size that is sent over the wire.

However, when we created this payload, we were omitting these fields completely even though the corresponding type does not have those fields as optional. This makes using our SDK types for deserialization impossible.

This PR adds in those fields in all cases and sets them to empty values if filtered out.

@MicaiahReid MicaiahReid changed the title Fix bitcoin payload serialization fix: make bitcoin payload serialization deserializable Apr 24, 2024
Copy link
Member

@lgalabru lgalabru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MicaiahReid!

@MicaiahReid MicaiahReid merged commit a0f1998 into develop Apr 25, 2024
4 of 6 checks passed
@MicaiahReid MicaiahReid deleted the fix-bitcoin-payload-serialization branch April 25, 2024 15:02
MicaiahReid added a commit that referenced this pull request May 8, 2024
When a Chainhook is triggered and we send a payload to a user, we filter
some values based on user settings (`include_proof`, `include_inputs`,
etc). This helps to reduce the payload size that is sent over the wire.

However, when we created this payload, we were omitting these fields
completely even though the corresponding type does not have those fields
as optional. This makes using our SDK types for deserialization
impossible.

This PR adds in those fields in all cases and sets them to empty values
if filtered out.
github-actions bot pushed a commit that referenced this pull request May 9, 2024
## [1.6.0](v1.5.1...v1.6.0) (2024-05-09)

### Features

* add Bitcoin transaction index to typescript client ([#568](#568)) ([6f7eba4](6f7eba4))

### Bug Fixes

* add stacks event position to ts client ([#575](#575)) ([3c48eeb](3c48eeb))
* add starting stacks height for prometheus metrics ([#567](#567)) ([6a8c086](6a8c086))
* make bitcoin payload serialization deserializable ([#569](#569)) ([5f20a86](5f20a86))
* set `Interrupted` status for streaming predicates that fail ([#574](#574)) ([11bde53](11bde53)), closes [#523](#523)
* shut down observer on bitcoin block download failure ([#573](#573)) ([f3530b7](f3530b7)), closes [#572](#572)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants