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

Typedef of serialize/deserialize in createStorage is forcing serialization #4196

Closed
1 task done
cryptoflop opened this issue Aug 8, 2024 · 1 comment
Closed
1 task done
Labels
Good First Issue Misc: Good First Issue

Comments

@cryptoflop
Copy link

Check existing issues

Describe the bug

When using a custom storage that supports any datatype without serialization (i.e. IndexedDB, in-memory) for a wagmi config, the typedefinition of serialize and deserialize force you to convert your data to a string and back.

Link to Minimal Reproducible Example

https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgYygUwIYzQZRtDAczTgF84AzKCEOAcgHciRg6AoN1TbPA4gCgRs4cAM5oowDABtgALzT8AbjICuaAJSJhIuAHo9cMBlGjgAO0JwYAC2qrCN6zZIrp6uCbjBRAGjjmEPCQpsAARtIkACYe+NYAnmBoUWgUOiLoMKpQ5nBu6jqkvjop4pIy8or5mtq6+oaiGCAkPqIeLujpcJnZudWFxSKi+FBEaABccNIQyDK8o8TFpBpsQA

Steps To Reproduce

No response

What Wagmi package(s) are you using?

wagmi, @wagmi/core

Wagmi Package(s) Version(s)

2.12.4

Viem Version

2.19.1

TypeScript Version

5.3

Anything else?

No response

@cryptoflop cryptoflop changed the title Typedef of serialize/deserialize in createStorage forcing serialization Typedef of serialize/deserialize in createStorage is forcing serialization Aug 8, 2024
@tmm tmm added the Good First Issue Misc: Good First Issue label Aug 8, 2024
@tmm tmm closed this as completed in b4c8971 Aug 9, 2024
Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Wagmi version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue Misc: Good First Issue
Projects
None yet
Development

No branches or pull requests

2 participants