From b947fd54c70921f1fcd686d5575d9cf844d68257 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Mon, 27 Apr 2020 12:15:00 -0230 Subject: [PATCH] Move default exports for all tx classes (#8416) --- app/scripts/controllers/transactions/index.js | 4 +--- app/scripts/controllers/transactions/pending-tx-tracker.js | 4 +--- app/scripts/controllers/transactions/tx-gas-utils.js | 4 +--- app/scripts/controllers/transactions/tx-state-manager.js | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index ec297c0df..852f0dcc6 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -65,7 +65,7 @@ import { hexToBn, bnToHex, BnMultiplyByFraction } from '../../lib/util' @param {Object} opts.preferencesStore */ -class TransactionController extends EventEmitter { +export default class TransactionController extends EventEmitter { constructor (opts) { super() this.networkStore = opts.networkStore || new ObservableStore({}) @@ -765,5 +765,3 @@ class TransactionController extends EventEmitter { this.memStore.updateState({ unapprovedTxs, currentNetworkTxList }) } } - -export default TransactionController diff --git a/app/scripts/controllers/transactions/pending-tx-tracker.js b/app/scripts/controllers/transactions/pending-tx-tracker.js index bfb0ffd58..6a70f31d0 100644 --- a/app/scripts/controllers/transactions/pending-tx-tracker.js +++ b/app/scripts/controllers/transactions/pending-tx-tracker.js @@ -19,7 +19,7 @@ import EthQuery from 'ethjs-query' @class */ -class PendingTransactionTracker extends EventEmitter { +export default class PendingTransactionTracker extends EventEmitter { constructor (config) { super() this.droppedBuffer = {} @@ -251,5 +251,3 @@ class PendingTransactionTracker extends EventEmitter { return sameNonce.length > 0 } } - -export default PendingTransactionTracker diff --git a/app/scripts/controllers/transactions/tx-gas-utils.js b/app/scripts/controllers/transactions/tx-gas-utils.js index 51528867a..b9a09e1c3 100644 --- a/app/scripts/controllers/transactions/tx-gas-utils.js +++ b/app/scripts/controllers/transactions/tx-gas-utils.js @@ -15,7 +15,7 @@ and used to do things like calculate gas of a tx. @param {Object} provider - A network provider. */ -class TxGasUtil { +export default class TxGasUtil { constructor (provider) { this.query = new EthQuery(provider) @@ -150,5 +150,3 @@ class TxGasUtil { return bnToHex(upperGasLimitBn) } } - -export default TxGasUtil diff --git a/app/scripts/controllers/transactions/tx-state-manager.js b/app/scripts/controllers/transactions/tx-state-manager.js index 0d986881a..1a25284a6 100644 --- a/app/scripts/controllers/transactions/tx-state-manager.js +++ b/app/scripts/controllers/transactions/tx-state-manager.js @@ -26,7 +26,7 @@ import { getFinalStates, normalizeTxParams } from './lib/util' @param {function} opts.getNetwork return network number @class */ -class TransactionStateManager extends EventEmitter { +export default class TransactionStateManager extends EventEmitter { constructor ({ initState, txHistoryLimit, getNetwork }) { super() @@ -484,5 +484,3 @@ class TransactionStateManager extends EventEmitter { this._saveTxList(transactionList.filter((txMeta) => txMeta.id !== txId)) } } - -export default TransactionStateManager