1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Move default exports for all tx classes (#8416)

This commit is contained in:
Whymarrh Whitby 2020-04-27 12:15:00 -02:30 committed by GitHub
parent b9c82d6ed9
commit b947fd54c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 12 deletions

View File

@ -65,7 +65,7 @@ import { hexToBn, bnToHex, BnMultiplyByFraction } from '../../lib/util'
@param {Object} opts.preferencesStore @param {Object} opts.preferencesStore
*/ */
class TransactionController extends EventEmitter { export default class TransactionController extends EventEmitter {
constructor (opts) { constructor (opts) {
super() super()
this.networkStore = opts.networkStore || new ObservableStore({}) this.networkStore = opts.networkStore || new ObservableStore({})
@ -765,5 +765,3 @@ class TransactionController extends EventEmitter {
this.memStore.updateState({ unapprovedTxs, currentNetworkTxList }) this.memStore.updateState({ unapprovedTxs, currentNetworkTxList })
} }
} }
export default TransactionController

View File

@ -19,7 +19,7 @@ import EthQuery from 'ethjs-query'
@class @class
*/ */
class PendingTransactionTracker extends EventEmitter { export default class PendingTransactionTracker extends EventEmitter {
constructor (config) { constructor (config) {
super() super()
this.droppedBuffer = {} this.droppedBuffer = {}
@ -251,5 +251,3 @@ class PendingTransactionTracker extends EventEmitter {
return sameNonce.length > 0 return sameNonce.length > 0
} }
} }
export default PendingTransactionTracker

View File

@ -15,7 +15,7 @@ and used to do things like calculate gas of a tx.
@param {Object} provider - A network provider. @param {Object} provider - A network provider.
*/ */
class TxGasUtil { export default class TxGasUtil {
constructor (provider) { constructor (provider) {
this.query = new EthQuery(provider) this.query = new EthQuery(provider)
@ -150,5 +150,3 @@ class TxGasUtil {
return bnToHex(upperGasLimitBn) return bnToHex(upperGasLimitBn)
} }
} }
export default TxGasUtil

View File

@ -26,7 +26,7 @@ import { getFinalStates, normalizeTxParams } from './lib/util'
@param {function} opts.getNetwork return network number @param {function} opts.getNetwork return network number
@class @class
*/ */
class TransactionStateManager extends EventEmitter { export default class TransactionStateManager extends EventEmitter {
constructor ({ initState, txHistoryLimit, getNetwork }) { constructor ({ initState, txHistoryLimit, getNetwork }) {
super() super()
@ -484,5 +484,3 @@ class TransactionStateManager extends EventEmitter {
this._saveTxList(transactionList.filter((txMeta) => txMeta.id !== txId)) this._saveTxList(transactionList.filter((txMeta) => txMeta.id !== txId))
} }
} }
export default TransactionStateManager