diff options
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/contentscript.js | 5 | ||||
-rw-r--r-- | app/scripts/controllers/transactions/tx-gas-utils.js | 10 | ||||
-rw-r--r-- | app/scripts/lib/inpage-provider.js | 5 |
3 files changed, 11 insertions, 9 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 7b7114c35..b7496f318 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -197,6 +197,7 @@ function blacklistedDomainCheck () { * Redirects the current page to a phishing information page */ function redirectToPhishingWarning () { - console.log('MetaMask - redirecting to phishing warning') - window.location.href = 'https://metamask.io/phishing.html' + console.log('MetaMask - routing to Phishing Warning component') + let extensionURL = extension.runtime.getURL('phishing.html') + window.location.href = extensionURL } diff --git a/app/scripts/controllers/transactions/tx-gas-utils.js b/app/scripts/controllers/transactions/tx-gas-utils.js index 9bf2ae1e2..3dd45507f 100644 --- a/app/scripts/controllers/transactions/tx-gas-utils.js +++ b/app/scripts/controllers/transactions/tx-gas-utils.js @@ -30,14 +30,10 @@ class TxGasUtil { try { estimatedGasHex = await this.estimateTxGas(txMeta, block.gasLimit) } catch (err) { - const simulationFailed = ( - err.message.includes('Transaction execution error.') || - err.message.includes('gas required exceeds allowance or always failing transaction') - ) - if (simulationFailed) { - txMeta.simulationFails = true - return txMeta + txMeta.simulationFails = { + reason: err.message, } + return txMeta } this.setTxGas(txMeta, block.gasLimit, estimatedGasHex) return txMeta diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index 4e65f0a23..6ef511453 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -54,6 +54,11 @@ function MetamaskInpageProvider (connectionStream) { // also remap ids inbound and outbound MetamaskInpageProvider.prototype.sendAsync = function (payload, cb) { const self = this + + if (payload.method === 'eth_signTypedData') { + console.warn('MetaMask: This experimental version of eth_signTypedData will be deprecated in the next release in favor of the standard as defined in EIP-712. See https://git.io/fNzPl for more information on the new standard.') + } + self.rpcEngine.handle(payload, cb) } |