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

unavailable for React Native #71

Closed
Chengchcc opened this issue Feb 12, 2019 · 0 comments
Closed

unavailable for React Native #71

Chengchcc opened this issue Feb 12, 2019 · 0 comments

Comments

@Chengchcc
Copy link

I am experiencing a problem. I want to use aion_web3 in my react native project, but all versions are unavailable for React Native platform due to it's cookies headers resulting this error:
51824357-ace6a880-22ea-11e9-85f3-dcca7f1de6cf
, see ethereum/web3.js#1802. and tradle/rn-nodeify#71
So when I modify aion-web3-provider-http/src/index.js

var XHR2 = require('xhr2') // jshint ignore: line

and commented out

if (this.host.substring(0,5) === "https"){  
        this.httpsAgent = new https.Agent({ keepAlive: true });  
    }else{  
        this.httpAgent = new http.Agent({ keepAlive: true });  
    }

and

request.nodejsSet({
        httpsAgent:this.httpsAgent,
        httpAgent:this.httpAgent
    });

then it works.
So do you have any suggestions?

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

1 participant