bitcore-channel icon indicating copy to clipboard operation
bitcore-channel copied to clipboard

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

Open TOMOAKI12345 opened this issue 10 years ago • 2 comments

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')));

TOMOAKI12345 avatar Sep 02 '15 03:09 TOMOAKI12345

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 avatar Sep 02 '15 12:09 braydonf

Updated in: https://github.com/bitpay/bitcore-channel/pull/37

braydonf avatar Oct 23 '15 15:10 braydonf