From 49d693dc1a63065306f6d260ac826ce9214dc681 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 26 Dec 2017 09:07:57 -0500 Subject: [PATCH] use givenProvider instead of currentProvider --- lib/contracts/code_templates/web3-connector.js.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/contracts/code_templates/web3-connector.js.ejs b/lib/contracts/code_templates/web3-connector.js.ejs index bcbf4fe1..6d7c4d54 100644 --- a/lib/contracts/code_templates/web3-connector.js.ejs +++ b/lib/contracts/code_templates/web3-connector.js.ejs @@ -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));