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 0 Amount Transfers #112

Merged
merged 1 commit into from
Dec 8, 2020
Merged

Fix 0 Amount Transfers #112

merged 1 commit into from
Dec 8, 2020

Conversation

tyler-whitman
Copy link
Collaborator

When the amount is 0 and we pass it into the proto for serialization the default value is actually getting serialized into the proto (which is not expected) and on the blockchain it doesnt get serialized in for default values which is what is supposed to happen.

For this reason transfers with 0 amount were failing. When we dont include these 0 values proto uses the default 0 and doesnt include them in the serialized transaction which makes everything line up correctly.

@allenan allenan merged commit ce0b0f2 into master Dec 8, 2020
@allenan allenan deleted the tyler/fix-0-amount-transfer branch December 8, 2020 19:46
@lthiery
Copy link
Member

lthiery commented Dec 8, 2020

This was pretty interesting to debug. I would think that the js proto serializer should omit fields when value is default but that doesn't seem the case. Unsure if its a misconfiguration, a bug in the js proto serializer, or whether its "just the way it is"

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.

None yet

3 participants