-
Notifications
You must be signed in to change notification settings - Fork 0
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
bug: strange value for censusSize
for SET_PROCESS_CENSUS
transaction
#62
Comments
I looked at the vocdoni-node code and I don't see anything that would cause a hexadecimal string or anything like that. For example, I tried creating a SET_PROCESS_CENSUS with a large CensusSize (of type
So I don't think it's the Go backend that's producing Looking at the UI code, I see: https://github.com/vocdoni/explorer-ui/blob/bc3a0e83ea1729d161483dd154c14f1c718bb487/components/pages/envelopes/details/index.tsx#L109
What eactly is the behavior of JSON.stringify, and what is envelope in there? My understanding of typescript is poor, but I think it would be of type In any case, I think it's the frontend that's encoding the JSON like that, not the backend. |
cc @p4u to get a second pair of eyes on this, because I don't know how the transactions and frontend work very well. |
Agree it has to be something with how the front is handling it... checking the API call, I clearly see a census size (in string) of 1000 here: https://api-stg.vocdoni.net/v2/chain/transactions/1176690/0 But at first sight I cannot understand how that |
Ok, found it: https://github.com/vocdoni/explorer/blob/main/src/components/Transactions/Detail.tsx#L28-L29 Our fault. Moving the issue to explorer, since it's a problem with how the explorer parses the transaction. |
There's actually a backend issue here. We were trying to do some magic because these calls do not properly return info like process id or transaction id, instead they return them encoded in base64 (due to marshaling defaults AFAIK) Opened a new issue in node to track this: vocdoni/vocdoni-node#1354 |
Closing this, follow-up vocdoni/vocdoni-node#1354 for updates |
Reopening, since it seems it's not going to be so easy to fix this in the backend. In the meantime, we should reduce the base64 decoding just to the two fields that we found encoded: |
Describe the bug
After executing a
SET_PROCESS_CENSUS
transaction, the value returned in the transaction seems odd. But the election info via API returns the correct value.To Reproduce (please complete the following information)
Current behavior
It shows something like:
Expected behavior
Should return the 1000 value. Remember that the census size is correctly set in the election.
The text was updated successfully, but these errors were encountered: