mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
lint fixes
This commit is contained in:
parent
25cffd21f8
commit
25bc15ba17
@ -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
|
||||
|
@ -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))
|
||||
}
|
||||
|
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user