You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
Apologies for posting this as an issue, as I suspect it's my own misunderstanding rather than anything actually wrong with provider-engine.
If I do:
var engine = ZeroClientProvider({
getAccounts: function(){},
rpcUrl: 'https://mainnet.infura.io/',
})
var web3 = new Web3(engine)
web3.eth.getBalance(someAddress, function(err, resp){
console.log(err);
console.log(resp);
});
I would expect it to either log an error from getBalance, or log the balance at someAddress. Instead, I get an error:
Web3ProviderEngine does not support synchronous requests.
at Web3ProviderEngine.send (index.js:71)
at RequestManager.send (index.js:74)
at sendRequest (index.js:519)
at Eth.send [as getBalance] (index.js:534)
I get similar results for anything that would have to go to the RPC server for a result. My understanding was that if I specified a callback function as the last argument to web3.eth.getBalance() it would run the request asynchronously and make a callback. This works if I use the straight HttpProvider for web3.
Where am I going wrong?
The text was updated successfully, but these errors were encountered:
It looks like my problem was that I had accidentally installed the web3 1.0.0-beta.13 version, and it looks like there are some breaking changes in 1.0.0. This may be something provider-engine will need to fix eventually to be compatible with 1.0.0, but that's another issue.
Apologies for posting this as an issue, as I suspect it's my own misunderstanding rather than anything actually wrong with provider-engine.
If I do:
I would expect it to either log an error from getBalance, or log the balance at someAddress. Instead, I get an error:
I get similar results for anything that would have to go to the RPC server for a result. My understanding was that if I specified a callback function as the last argument to web3.eth.getBalance() it would run the request asynchronously and make a callback. This works if I use the straight HttpProvider for web3.
Where am I going wrong?
The text was updated successfully, but these errors were encountered: