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

Improve usability of StateStore to get and set new values for accounts #3913

Closed
lsilvs opened this issue Jul 3, 2019 · 0 comments
Closed

Comments

@lsilvs
Copy link
Contributor

lsilvs commented Jul 3, 2019

Expected behavior

Expect to be able to mutate the state of the account returned by store.account.get(accountId) and use it to set the new values by calling store.account.set(accountId, account)

Actual behavior

It doesn't set the new values if the account used as second parameter of store.account.set(accountId, account) is the account returned by store.account.get(accountId)

Steps to reproduce

const account = store.account.get(accountId);
account.asset = { newAttr: true };
store.account.set(accountId, account);

Which version(s) does this affect? (Environment, OS, etc...)

2.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants