Skip to content

Add option to retrieve an address from an output#1009

Closed
eordano wants to merge 1 commit intobitpay:masterfrom
eordano:feature/outputAddress
Closed

Add option to retrieve an address from an output#1009
eordano wants to merge 1 commit intobitpay:masterfrom
eordano:feature/outputAddress

Conversation

@eordano
Copy link
Contributor

@eordano eordano commented Jan 28, 2015

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no address associated to the script the accessor will throw an error.

I think returning null is a good solution for this scenario, that provides a clean way to check if the output has an address without a try/catch block. The other option is to make it a function and let the error bubble up.

@maraoz
Copy link
Contributor

maraoz commented Jan 28, 2015

I would do it via a method, not a property.

@eordano
Copy link
Contributor Author

eordano commented Jan 28, 2015

Closing, the toAddress method already exists in the script property of the output.

@eordano eordano closed this Jan 28, 2015
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) to 96.91% when pulling 159b8d8 on eordano:feature/outputAddress into 1f56389 on bitpay:master.

@eordano eordano deleted the feature/outputAddress branch February 13, 2015 12:26
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