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 storage loading #132

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Fix storage loading #132

merged 2 commits into from
Oct 17, 2024

Conversation

thpani
Copy link
Collaborator

@thpani thpani commented Oct 8, 2024

Fix a type annotation and loading of storage MultiContractStorage maps:

Immutable.fromJS deeply converts all JS objects to Maps.
For deserializing storage, we want the target object to instead be

Map -> JS object {instance: Map, persistent: Map, temporary: Map}

Thus, we provide a custom loader instead.

Immutable.fromJS deeply converts all JS objects to Maps.
For deserializing storage, we want the target object to instead be
Map -> JS object {instance:, persistent:, temporary:} -> Map.
Thus, we provide a custom loader instead.
Copy link
Contributor

@konnov konnov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix!

@thpani thpani merged commit d6fae62 into main Oct 17, 2024
3 checks passed
@thpani thpani deleted the th/fix-storage-loading branch October 17, 2024 12:51
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.

2 participants