aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-06-15 14:44:02 +0800
committerkumavis <aaron@kumavis.me>2017-06-15 14:44:02 +0800
commitb3492d9c17e62332c17bb082c23db30512e2b881 (patch)
tree479c6f99d540a4dff2fc1f0910f8ea0a4cbacaa3 /test
parentdab2fccc78ad76095cc12ce0a1056d9b7a9d6001 (diff)
downloadtangerine-wallet-browser-b3492d9c17e62332c17bb082c23db30512e2b881.tar
tangerine-wallet-browser-b3492d9c17e62332c17bb082c23db30512e2b881.tar.gz
tangerine-wallet-browser-b3492d9c17e62332c17bb082c23db30512e2b881.tar.bz2
tangerine-wallet-browser-b3492d9c17e62332c17bb082c23db30512e2b881.tar.lz
tangerine-wallet-browser-b3492d9c17e62332c17bb082c23db30512e2b881.tar.xz
tangerine-wallet-browser-b3492d9c17e62332c17bb082c23db30512e2b881.tar.zst
tangerine-wallet-browser-b3492d9c17e62332c17bb082c23db30512e2b881.zip
transaction controller - use nonce-tracker
Diffstat (limited to 'test')
-rw-r--r--test/unit/tx-controller-test.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js
index f0d8a706e..7c8d1761d 100644
--- a/test/unit/tx-controller-test.js
+++ b/test/unit/tx-controller-test.js
@@ -1,5 +1,4 @@
const assert = require('assert')
-const EventEmitter = require('events')
const ethUtil = require('ethereumjs-util')
const EthTx = require('ethereumjs-tx')
const EthQuery = require('eth-query')
@@ -19,13 +18,15 @@ describe('Transaction Controller', function () {
txController = new TransactionController({
networkStore: new ObservableStore(currentNetworkId),
txHistoryLimit: 10,
- blockTracker: new EventEmitter(),
- ethQuery: new EthQuery(new EventEmitter()),
+ blockTracker: { getCurrentBlock: noop, on: noop },
+ provider: { sendAsync: noop },
+ ethQuery: new EthQuery({ sendAsync: noop }),
signTransaction: (ethTx) => new Promise((resolve) => {
ethTx.sign(privKey)
resolve()
}),
})
+ txController.nonceTracker.getNonceLock = () => Promise.resolve({ nextNonce: 0, releaseLock: noop })
})
describe('#validateTxParams', function () {