-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 mutability object es6 branch #2199
Conversation
I will close this PR because the other PR you created does include these changes. |
I'm sorry, but this doesn't seem to be resolved even on version 1.2.1 (which was released long after this issue had been closed here). I clearly see that function Specifically, I see that it changes the value of the It is clearly visible in your code, at file web3-eth-accounts/src/index.js / line 167:
There is obviously no deep cloning of the input object here, hence the lines that follow change it:
Thanks Update: I am guessing that perhaps the deep-cloning was meant to be done via:
If so, then here is how I have verified that this does not achieve the purpose:
The printout is:
|
The deep cloning got implemented but we were forced to release a old version of web3 as 1.0 and the refactored lib as 2.0-alpha. Will add this to the back-port list in the stabilization issue asap. |
@nivida: |
Yep:) |
Looking at branch 1.x, I see:
So how could a fix possibly exist on this branch? (since I posted this less 13 hours ago). |
It will be available as soon as we have back-ported it. Sorry wasn‘t reading your comment close enough. I‘m currently attending devcon in Osaka and will back-port it as soon as possible. Just follow the release notes and feel free to propose a PR with a generic fix for it. |
@nivida: |
Fixes #2190
The transaction object can be deep cloned by parsing to a string and back. I do coincide that muting an object by passing the reference, without telling the user, is a bad idea. Using ES6.