diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/transactions.js | 6 | ||||
-rw-r--r-- | app/scripts/lib/tx-utils.js | 7 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 2 |
3 files changed, 4 insertions, 11 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 8855dfd5b..0c63a5647 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -1,11 +1,9 @@ const EventEmitter = require('events') -const async = require('async') const extend = require('xtend') -const pify = require('pify') const clone = require('clone') const ObservableStore = require('obs-store') const ethUtil = require('ethereumjs-util') -const EthQuery = require('ethjs-query'); +const EthQuery = require('ethjs-query') const TxProviderUtil = require('../lib/tx-utils') const getStack = require('../lib/util').getStack const createId = require('../lib/random-id') @@ -168,7 +166,7 @@ module.exports = class TransactionController extends EventEmitter { history: [], } // add default tx params - await this.addTxDefaults(txMeta), + await this.addTxDefaults(txMeta) // save txMeta this.addTx(txMeta) return txMeta diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js index 5b9fe0167..24ea2d763 100644 --- a/app/scripts/lib/tx-utils.js +++ b/app/scripts/lib/tx-utils.js @@ -1,4 +1,3 @@ -const async = require('async') const ethUtil = require('ethereumjs-util') const Transaction = require('ethereumjs-tx') const normalize = require('eth-sig-util').normalize @@ -88,7 +87,7 @@ module.exports = class txProvideUtils { } validateTxParams (txParams) { - return new Promise ((resolve, reject) => { + return new Promise((resolve, reject) => { if (('value' in txParams) && txParams.value.indexOf('-') === 0) { reject(new Error(`Invalid transaction value of ${txParams.value} not a positive number.`)) } else { @@ -111,10 +110,6 @@ module.exports = class txProvideUtils { // util -function isUndef (value) { - return value === undefined -} - function bnToHex (inputBn) { return ethUtil.addHexPrefix(inputBn.toString(16)) } diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index af4ea32e3..46a01c900 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -446,7 +446,7 @@ module.exports = class MetamaskController extends EventEmitter { this.sendUpdate() this.opts.showUnapprovedTx(txMeta) // listen for tx completion (success, fail) - return new Promise ((resolve, reject) => { + return new Promise((resolve, reject) => { this.txController.once(`${txMeta.id}:finished`, (completedTx) => { switch (completedTx.status) { case 'submitted': |