fairDataSociety / blossom

Browser Extension based on Fair Data Protocol
Apache License 2.0
5 stars 4 forks source link

fix: buffer serialization #114

Closed tomicvladan closed 1 year ago

tomicvladan commented 1 year ago

When a file is downloaded or uploaded, its content is sent as uint8Array. But the extension API is not preserving that type, instead when transferring the uint8Array between processes it is converted to an object automatically. In this fix, those objects are converted back to uint8Array which enables dApps to use the original fdp-storage API.

tomicvladan commented 1 year ago

Unfortunately, I couldn't find a way to share code between the library and the main project. Because if the library references a file outside of its directory, then types are generated in wrong paths.