Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.

Comments

FIX: Make node-bitcoin compatable with browserify#22

Closed
brandonrobertz wants to merge 1 commit intofreewil:masterfrom
brandonrobertz:master
Closed

FIX: Make node-bitcoin compatable with browserify#22
brandonrobertz wants to merge 1 commit intofreewil:masterfrom
brandonrobertz:master

Conversation

@brandonrobertz
Copy link

I have some isomorphic JS that currently uses node-bitcoin. It works beautifully inside node. When I browserify it, the replacement http module that provides the request object, doesn't have a setTimeout method, which causes a crash. This is a simple two-line fix that allows this library to work in the browser, as well.

@freewil
Copy link
Owner

freewil commented Jan 17, 2015

wouldn't a better solution be to send a pull request to http-browserify?

@brandonrobertz
Copy link
Author

That would be cleaner on this end. I guess I can give that a shot first if you'd prefer. But with 25 open pull requests and an existing issue about setTimeout from 8 months ago with zero comments, I'm not sure how far I'll get.

@brandonrobertz
Copy link
Author

I commented on browserify/http-browserify#49 to see there's any interest in a fix for this upstream.

@dcousens
Copy link

@freewil it would be cleaner. Alternatively you could use https://github.com/scottcorgan/httpify, a shim for xhr and request; both of which support timeout as an option.

@brandonrobertz
Copy link
Author

I'm going to close this ticket and focus on patching http-browserify.

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.

3 participants