diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-11-16 04:03:13 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-11-16 04:03:13 +0800 |
commit | e61ba93194fe1bfb5fd2644951eebb3f3369f4ad (patch) | |
tree | df23cb13d13e345bbbc3a904fb9161570bdd2d6d /app | |
parent | f8d38f44c2612f0f291063814ec0e98bb4aaf4bb (diff) | |
parent | 707a10548d4c6f1574395c7d72f432fa65d6fb9a (diff) | |
download | tangerine-wallet-browser-e61ba93194fe1bfb5fd2644951eebb3f3369f4ad.tar tangerine-wallet-browser-e61ba93194fe1bfb5fd2644951eebb3f3369f4ad.tar.gz tangerine-wallet-browser-e61ba93194fe1bfb5fd2644951eebb3f3369f4ad.tar.bz2 tangerine-wallet-browser-e61ba93194fe1bfb5fd2644951eebb3f3369f4ad.tar.lz tangerine-wallet-browser-e61ba93194fe1bfb5fd2644951eebb3f3369f4ad.tar.xz tangerine-wallet-browser-e61ba93194fe1bfb5fd2644951eebb3f3369f4ad.tar.zst tangerine-wallet-browser-e61ba93194fe1bfb5fd2644951eebb3f3369f4ad.zip |
Merge branch 'master' into merge-master
Diffstat (limited to 'app')
-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 |
3 files changed, 12 insertions, 2 deletions
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 |