diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-11-16 04:39:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-16 04:39:34 +0800 |
commit | fbd04a6af6e9eda22eebaae27d712ae08272c131 (patch) | |
tree | bbb643e10e42d8113fe2d67d78efccd56b92322c /app | |
parent | f8d38f44c2612f0f291063814ec0e98bb4aaf4bb (diff) | |
parent | 03968ffafe27e64dcdf58764057cee1d67aa4168 (diff) | |
download | tangerine-wallet-browser-fbd04a6af6e9eda22eebaae27d712ae08272c131.tar tangerine-wallet-browser-fbd04a6af6e9eda22eebaae27d712ae08272c131.tar.gz tangerine-wallet-browser-fbd04a6af6e9eda22eebaae27d712ae08272c131.tar.bz2 tangerine-wallet-browser-fbd04a6af6e9eda22eebaae27d712ae08272c131.tar.lz tangerine-wallet-browser-fbd04a6af6e9eda22eebaae27d712ae08272c131.tar.xz tangerine-wallet-browser-fbd04a6af6e9eda22eebaae27d712ae08272c131.tar.zst tangerine-wallet-browser-fbd04a6af6e9eda22eebaae27d712ae08272c131.zip |
Merge pull request #2590 from MetaMask/merge-master
Merge master
Diffstat (limited to 'app')
-rw-r--r-- | app/manifest.json | 2 | ||||
-rw-r--r-- | app/scripts/controllers/transactions.js | 3 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 2 | ||||
-rw-r--r-- | app/scripts/platforms/extension.js | 9 |
4 files changed, 13 insertions, 3 deletions
diff --git a/app/manifest.json b/app/manifest.json index 65d7a4811..ff595c717 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "MetaMask", "short_name": "Metamask", - "version": "4.0.3", + "version": "4.0.4", "manifest_version": 2, "author": "https://metamask.io", "description": "Ethereum Browser Extension", diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index ef659a300..a861c0342 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -133,7 +133,7 @@ module.exports = class TransactionController extends EventEmitter { async newUnapprovedTransaction (txParams) { log.debug(`MetaMaskController newUnapprovedTransaction ${JSON.stringify(txParams)}`) const txMeta = await this.addUnapprovedTransaction(txParams) - this.emit('newUnaprovedTx', txMeta) + this.emit('newUnapprovedTx', txMeta) // listen for tx completion (success, fail) return new Promise((resolve, reject) => { this.txStateManager.once(`${txMeta.id}:finished`, (completedTx) => { @@ -170,6 +170,7 @@ module.exports = class TransactionController extends EventEmitter { async addTxDefaults (txMeta) { const txParams = txMeta.txParams // ensure value + txMeta.gasPriceSpecified = Boolean(txParams.gasPrice) const gasPrice = txParams.gasPrice || await this.query.gasPrice() txParams.gasPrice = ethUtil.addHexPrefix(gasPrice.toString(16)) txParams.value = txParams.value || '0x0' diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index a8a10e106..bd71da8e0 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -128,7 +128,7 @@ module.exports = class MetamaskController extends EventEmitter { blockTracker: this.blockTracker, ethQuery: this.ethQuery, }) - this.txController.on('newUnaprovedTx', opts.showUnapprovedTx.bind(opts)) + this.txController.on('newUnapprovedTx', opts.showUnapprovedTx.bind(opts)) // computed balances (accounting for pending transactions) this.balancesController = new BalancesController({ diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js index 0afe04b74..2f47512eb 100644 --- a/app/scripts/platforms/extension.js +++ b/app/scripts/platforms/extension.js @@ -17,6 +17,15 @@ class ExtensionPlatform { return extension.runtime.getManifest().version } + getPlatformInfo (cb) { + try { + extension.runtime.getPlatformInfo((platform) => { + cb(null, platform) + }) + } catch (e) { + cb(e) + } + } } module.exports = ExtensionPlatform |