Consensys / eth-lightwallet

Lightweight JS Wallet for Node and the browser
MIT License
1.47k stars 503 forks source link

Hide deprecation warning with createVault constructor #116

Closed danfinlay closed 8 years ago

danfinlay commented 8 years ago

This is a cleanup patch from the new constructor feature.

The KeyStore.createVault method relies on the underlying new constructor, which we have issuing a deprecation warning, so now that warning is actually firing always.

We were talking about getting rid of the new method eventually, but to actually stop using it while most of its methods are instance methods on the prototype would require a bit of a refactor.

This is a cheap solution that avoids that refactor for the moment.

In the slightly longer term, we might want to make the current KeyStore class simply return another internal class, so it can use the new constructor internally, while only throwing the deprecation warning when its own new constructor is used.

I'm opening to making that change to this PR, but wanted to open the discussion first.

slothbag commented 8 years ago

Not much happening getting this merged.. is eth-lightwallet still being maintained?

danfinlay commented 8 years ago

@christianlundkvist

coder5876 commented 8 years ago

This flew under the radar a bit. Checked it out and looks good. @flyswatter can you bump the version in package.json and add a note in RELEASE-NOTES? After that I can merge and publish in npm. Thanks! 😃

coder5876 commented 8 years ago

Merging this now since I have some time. :) Will also update version and push to npm.

coder5876 commented 8 years ago

Ok done! :) Eventually I want to deprecate the old version.