aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/app/controllers/transactions/tx-controller-test.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-05-29 05:29:31 +0800
committerkumavis <aaron@kumavis.me>2018-05-29 05:29:31 +0800
commit5be154ea2035810462ff0e7051e537870bfc1afb (patch)
tree438d5c4cf20001645adff24151d9f0222bbf5782 /test/unit/app/controllers/transactions/tx-controller-test.js
parent9f8d5f05470d68a7a9a5474a5b1f4587398e94a3 (diff)
downloadtangerine-wallet-browser-5be154ea2035810462ff0e7051e537870bfc1afb.tar
tangerine-wallet-browser-5be154ea2035810462ff0e7051e537870bfc1afb.tar.gz
tangerine-wallet-browser-5be154ea2035810462ff0e7051e537870bfc1afb.tar.bz2
tangerine-wallet-browser-5be154ea2035810462ff0e7051e537870bfc1afb.tar.lz
tangerine-wallet-browser-5be154ea2035810462ff0e7051e537870bfc1afb.tar.xz
tangerine-wallet-browser-5be154ea2035810462ff0e7051e537870bfc1afb.tar.zst
tangerine-wallet-browser-5be154ea2035810462ff0e7051e537870bfc1afb.zip
controllers - transactions - merge @frankiebee's work with mine
Diffstat (limited to 'test/unit/app/controllers/transactions/tx-controller-test.js')
-rw-r--r--test/unit/app/controllers/transactions/tx-controller-test.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/unit/app/controllers/transactions/tx-controller-test.js b/test/unit/app/controllers/transactions/tx-controller-test.js
index c450ed3ed..b0cc0acda 100644
--- a/test/unit/app/controllers/transactions/tx-controller-test.js
+++ b/test/unit/app/controllers/transactions/tx-controller-test.js
@@ -1,4 +1,5 @@
const assert = require('assert')
+const EventEmitter = require('events')
const ethUtil = require('ethereumjs-util')
const EthTx = require('ethereumjs-tx')
const EthjsQuery = require('ethjs-query')
@@ -26,12 +27,13 @@ describe('Transaction Controller', function () {
provider = createTestProviderTools({ scaffold: providerResultStub }).provider
query = new EthjsQuery(provider)
fromAccount = getTestAccounts()[0]
-
+ const blockTrackerStub = new EventEmitter()
+ blockTrackerStub.getCurrentBlock = noop
txController = new TransactionController({
provider,
networkStore: new ObservableStore(currentNetworkId),
txHistoryLimit: 10,
- blockTracker: { getCurrentBlock: noop, on: noop, once: noop },
+ blockTracker: blockTrackerStub,
signTransaction: (ethTx) => new Promise((resolve) => {
ethTx.sign(fromAccount.key)
resolve()