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(network): fix dynamic data warning #888

Merged
merged 1 commit into from
May 18, 2023
Merged

Conversation

holic
Copy link
Member

@holic holic commented May 18, 2023

Fixes these warnings:
image

When we moved PackedCounter's byte lengths in #804, the accumulator became a bigint in JS, but I didn't account for that originally when incrementing the byte offset and checking if lengths match.

image

This is a quick fix that just casts the number to bigint for now, but long term we should probably move to bigints for this value if it has the potential to exceed the max value of number.

This mostly wasn't discovered by TS because decodeStaticField and decodeDynamicField don't return the primitive type that corresponds to the passed in schema type. Hoping to refactor this in the future and fix this.

@holic holic force-pushed the holic/dynamic-data-warning branch from 21dea08 to 99b1107 Compare May 18, 2023 02:53
@holic holic merged commit 85e38ba into main May 18, 2023
@holic holic deleted the holic/dynamic-data-warning branch May 18, 2023 02:54
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

Successfully merging this pull request may close these issues.

1 participant