use givenProvider instead of currentProvider

This commit is contained in:
Iuri Matias 2017-12-26 09:07:57 -05:00
parent cd0fd94386
commit 49d693dc1a
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ __reduce(<%- connectionList %>,function(prev, value, next) {
}
if (value === '$WEB3' && (typeof web3 !== 'undefined' && typeof Web3 !== 'undefined')) {
web3.setProvider(web3.currentProvider);
web3.setProvider(web3.givenProvider);
} else if (value !== '$WEB3' && (typeof Web3 !== 'undefined' && ((typeof web3 === 'undefined') || (typeof web3 !== 'undefined' && (!web3.isConnected || (web3.isConnected && !web3.isConnected())))))) {
web3.setProvider(new Web3.providers.HttpProvider(value));