varmessage='The MetaMask Web3 object does not support synchronous methods. See https://github.com/MetaMask/faq#all-async---think-of-metamask-as-a-light-client for details.'
thrownewError(message)
}
@ -89,35 +81,6 @@ MetamaskInpageProvider.prototype.isConnected = function () {
// util
functioncreateSyncProvider(providerConfig){
providerConfig=providerConfig||{}
letsyncProviderUrl
if(providerConfig.rpcTarget){
syncProviderUrl=providerConfig.rpcTarget
}else{
switch(providerConfig.type){
case'testnet':
syncProviderUrl=MetamaskConfig.network.testnet
break
case'mainnet':
syncProviderUrl=MetamaskConfig.network.mainnet
break
default:
syncProviderUrl=MetamaskConfig.network.default
}
}
constprovider=newHttpProvider(syncProviderUrl)
// Stubbing out the send method to throw on sync methods:
provider.send=function(){
varmessage='The MetaMask Web3 object does not support synchronous methods. See https://github.com/MetaMask/faq#all-async---think-of-metamask-as-a-light-client for details.'