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

fixed PrivateKey initialization from JSON #1262

Merged
merged 2 commits into from
Jun 5, 2015
Merged

Conversation

mpolci
Copy link
Contributor

@mpolci mpolci commented Jun 3, 2015

I discovered this error after calling toWIF() method on privateKey initialized from a json text like this:
{"bn":"ce6...fec","compressed":true,"network":"testnet"}
The network was not initialized with a Network object but toWIF() needs to read network.privatekey.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) to 97.97% when pulling d60d8cf on mpolci:master into c671a97 on bitpay:master.

@braydonf
Copy link
Contributor

braydonf commented Jun 4, 2015

I think we should add a test that checks instantiation from JSON if it doesn't already exist.

@mpolci
Copy link
Contributor Author

mpolci commented Jun 5, 2015

I wrote the test

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) to 97.97% when pulling 0d2784e on mpolci:master into c671a97 on bitpay:master.

@pnagurny
Copy link
Contributor

pnagurny commented Jun 5, 2015

LGTM

pnagurny added a commit that referenced this pull request Jun 5, 2015
fixed PrivateKey initialization from JSON
@pnagurny pnagurny merged commit 49e621f into bitpay:master Jun 5, 2015
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.

4 participants