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

Cannot pass ArrayObjects over json-rpc #76

Open
zo-el opened this issue Feb 24, 2021 · 2 comments
Open

Cannot pass ArrayObjects over json-rpc #76

zo-el opened this issue Feb 24, 2021 · 2 comments

Comments

@zo-el
Copy link
Member

zo-el commented Feb 24, 2021

Currently while passing Buffers and UInt8Arrays over json-rpc changes the type into an object as mentioned bellow
For Buffers

{ type: "Buffer", data: [120, 32, 45] }

or For Uint8Arrays

{"0": 120, "1": 32, "2": 45}

This causes an issues when sending a zomeCall that expects a HoloHash/Uint8Array: #73

@zo-el
Copy link
Member Author

zo-el commented Feb 24, 2021

Current Solution:

Updated the payload for zomeCall to be encoded on the web-sdk and decoded on holo-envoy.

Also, note that we still cannot pass buffers so update the UI to have Uint8Arrays instead

Solution:

Update to use msgpack instead of json-rpc.

  • Note keep a track of the data-translator as well because that could be causing issues

@contesini
Copy link

Development branch has updated to use msgpack instead of json-rpc

const msgpack = require('@msgpack/msgpack');

I think we can close this issue.

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

No branches or pull requests

2 participants