aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/tx-controller-test.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-08-22 02:35:22 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-08-22 02:35:22 +0800
commitfbba3a1ac8575b910e8a2a684748d617eec19414 (patch)
treec2940c33345d128a2888fc4441b8342e6b778d65 /test/unit/tx-controller-test.js
parent7ea83b6bae34dcf652d85474fe1d82893d592d55 (diff)
parent9203b4edf9df8b616877c57970fb01a7fb87924b (diff)
downloadtangerine-wallet-browser-fbba3a1ac8575b910e8a2a684748d617eec19414.tar
tangerine-wallet-browser-fbba3a1ac8575b910e8a2a684748d617eec19414.tar.gz
tangerine-wallet-browser-fbba3a1ac8575b910e8a2a684748d617eec19414.tar.bz2
tangerine-wallet-browser-fbba3a1ac8575b910e8a2a684748d617eec19414.tar.lz
tangerine-wallet-browser-fbba3a1ac8575b910e8a2a684748d617eec19414.tar.xz
tangerine-wallet-browser-fbba3a1ac8575b910e8a2a684748d617eec19414.tar.zst
tangerine-wallet-browser-fbba3a1ac8575b910e8a2a684748d617eec19414.zip
Merge branch 'master' into transactionControllerRefractorPt3
Diffstat (limited to 'test/unit/tx-controller-test.js')
-rw-r--r--test/unit/tx-controller-test.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js
index 40be490c0..fdbddac4b 100644
--- a/test/unit/tx-controller-test.js
+++ b/test/unit/tx-controller-test.js
@@ -6,12 +6,15 @@ const clone = require('clone')
const sinon = require('sinon')
const TransactionController = require('../../app/scripts/controllers/transactions')
const TxProvideUtils = require('../../app/scripts/lib/tx-utils')
+const txStateHistoryHelper = require('../../app/scripts/lib/tx-state-history-helper')
+
const noop = () => true
const currentNetworkId = 42
const otherNetworkId = 36
const privKey = new Buffer('8718b9618a37d1fc78c436511fc6df3c8258d3250635bba617f33003270ec03e', 'hex')
const { createStubedProvider } = require('../stub/provider')
+
describe('Transaction Controller', function () {
let txController, engine, provider, providerResultStub
@@ -46,9 +49,10 @@ describe('Transaction Controller', function () {
id: 1,
metamaskNetworkId: currentNetworkId,
txParams,
+ history: [],
}
txController.txStateManager._saveTxList([txMeta])
- stub = sinon.stub(txController, 'addUnapprovedTransaction').returns(Promise.resolve(txMeta))
+ stub = sinon.stub(txController, 'addUnapprovedTransaction').returns(Promise.resolve(txController.txStateManager.addTx(txMeta)))
})
afterEach(function () {
@@ -163,7 +167,8 @@ describe('Transaction Controller', function () {
describe('#addTx', function () {
it('should emit updates', function (done) {
- txMeta = {
+ const txMeta = {
+ id: '1',
status: 'unapproved',
id: 1,
metamaskNetworkId: currentNetworkId,