Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Conversation

@fanatid
Copy link
Contributor

@fanatid fanatid commented Oct 27, 2015

Original PR: bitpay/bitcore#1346

@eordano
Copy link
Contributor

eordano commented Jan 23, 2016

Just bumped into this issue. Can we merge it?

CC: @braydonf

@braydonf
Copy link
Contributor

The original PR mentioned tx.outputs[1].script as being null.

var script = bitcore.Script(tx.outputs[1].script)

However tx.outputs[1].script should already be an instance of Script if it's able to be parsed, otherwise it will return null, and using the raw buffer is necessary ._scriptBuffer, and in that case var script = bitcore.Script(tx.outputs[1]._scriptBuffer) will throw an error.

Edit: And why checking the value before using it is necessary, e.g. https://github.com/bitpay/bitcore-node/blob/master/lib/services/address/index.js#L492

Is that the issue?

@matiu
Copy link
Contributor

matiu commented Oct 26, 2017

ACK

@matiu matiu merged commit 75c056f into bitpay:master Oct 26, 2017
@fanatid
Copy link
Contributor Author

fanatid commented Oct 26, 2017

1 day before 2 year old 🎉

shohu pushed a commit to c0banparty/bitcore-lib-c0ban that referenced this pull request Nov 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants