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

Update examples with the latest version of bitcore v0.13.x #32

Open
TOMOAKI12345 opened this issue Sep 2, 2015 · 2 comments
Open

Update examples with the latest version of bitcore v0.13.x #32

TOMOAKI12345 opened this issue Sep 2, 2015 · 2 comments

Comments

@TOMOAKI12345
Copy link

examples/01.createChannel.js
fs.writeFileSync('unsigned.refund.log', consumer.setupRefund().toJSON());
write [object Object]

so that is not working
examples/02.signRefund.js
var refund = JSON.parse(String(fs.readFileSync('unsigned.refund.log')));

@braydonf
Copy link
Contributor

braydonf commented Sep 2, 2015

The behavior or toJSON() has recently changed in the latest Bitcore release (see release notes), and JSON.stringify will return a string:

JSON.stringify(consumer.setupRefund())

The examples need to be updated.

@braydonf braydonf changed the title toJSON() not working. Update examples with the latest version of bitcore v0.13.x Sep 8, 2015
@braydonf
Copy link
Contributor

Updated in: #37

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

No branches or pull requests

2 participants