diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-08-02 23:47:13 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-08-02 23:47:13 +0800 |
commit | 25bc15ba175091513f6d281e9a16f3643fe4b18d (patch) | |
tree | fc4487a4170e754a7043a914a9422915432dfa27 /app/scripts | |
parent | 25cffd21f8defdf5a1bf139bdc2e3b1cfd08c220 (diff) | |
download | tangerine-wallet-browser-25bc15ba175091513f6d281e9a16f3643fe4b18d.tar tangerine-wallet-browser-25bc15ba175091513f6d281e9a16f3643fe4b18d.tar.gz tangerine-wallet-browser-25bc15ba175091513f6d281e9a16f3643fe4b18d.tar.bz2 tangerine-wallet-browser-25bc15ba175091513f6d281e9a16f3643fe4b18d.tar.lz tangerine-wallet-browser-25bc15ba175091513f6d281e9a16f3643fe4b18d.tar.xz tangerine-wallet-browser-25bc15ba175091513f6d281e9a16f3643fe4b18d.tar.zst tangerine-wallet-browser-25bc15ba175091513f6d281e9a16f3643fe4b18d.zip |
lint fixes
Diffstat (limited to 'app/scripts')
-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': |