diff options
author | Thomas Huang <thomas.b.huang@gmail.com> | 2018-08-02 01:40:31 +0800 |
---|---|---|
committer | Thomas Huang <thomas.b.huang@gmail.com> | 2018-08-02 01:40:31 +0800 |
commit | 024ebe07e0c61e7185e84499a2f19885ac52e4a9 (patch) | |
tree | 88ed997d61c225573b7d75c357f5c11b6840a3ea /app/scripts | |
parent | 5b3927fe5b5243a89e5fd31ad069da9ea5c987e9 (diff) | |
parent | 4f02726fd9a2b7509dfd00eb4b23d9fc81eb5dcd (diff) | |
download | tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.gz tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.bz2 tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.lz tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.xz tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.tar.zst tangerine-wallet-browser-024ebe07e0c61e7185e84499a2f19885ac52e4a9.zip |
Merge branch 'develop' into network-remove-provider-engine-tests
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) } |