mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-25 21:18:51 +00:00
use givenProvider instead of currentProvider
This commit is contained in:
parent
cd0fd94386
commit
49d693dc1a
@ -5,7 +5,7 @@ __reduce(<%- connectionList %>,function(prev, value, next) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (value === '$WEB3' && (typeof web3 !== 'undefined' && typeof Web3 !== 'undefined')) {
|
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())))))) {
|
} 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));
|
web3.setProvider(new Web3.providers.HttpProvider(value));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user