aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/tx-controller-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/tx-controller-test.js')
-rw-r--r--test/unit/tx-controller-test.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js
index 13056417c..dd8b48684 100644
--- a/test/unit/tx-controller-test.js
+++ b/test/unit/tx-controller-test.js
@@ -25,14 +25,14 @@ describe('Transaction Controller', function () {
networkStore: new ObservableStore(currentNetworkId),
txHistoryLimit: 10,
blockTracker: { getCurrentBlock: noop, on: noop, once: noop },
- ethStore: { getState: noop },
+ accountTracker: { getState: noop },
signTransaction: (ethTx) => new Promise((resolve) => {
ethTx.sign(privKey)
resolve()
}),
})
txController.nonceTracker.getNonceLock = () => Promise.resolve({ nextNonce: 0, releaseLock: noop })
- txController.txProviderUtils = new TxGasUtils(txController.provider)
+ txController.txProviderUtils = new TxGasUtils(txController.provider)
})
describe('#getState', function () {
@@ -233,7 +233,7 @@ describe('Transaction Controller', function () {
txParams: {},
}
- const eventNames = ['updateBadge', '1:unapproved']
+ const eventNames = ['update:badge', '1:unapproved']
const listeners = []
eventNames.forEach((eventName) => {
listeners.push(new Promise((resolve) => {
@@ -377,7 +377,7 @@ describe('Transaction Controller', function () {
it('should publish a tx, updates the rawTx when provided a one', async function () {
txController.txStateManager.addTx(txMeta)
await txController.publishTransaction(txMeta.id)
- const publishedTx = txController.txStateManager.getTx(1)
+ const publishedTx = txController.txStateManager.getTx(1)
assert.equal(publishedTx.hash, hash)
assert.equal(publishedTx.status, 'submitted')
})
@@ -413,7 +413,7 @@ describe('Transaction Controller', function () {
txController.txStateManager._saveTxList([
{ id: 1, status: 'unapproved', metamaskNetworkId: currentNetworkId, txParams: {} },
{ id: 2, status: 'rejected', metamaskNetworkId: currentNetworkId, txParams: {} },
- { id: 3, status: 'approved', metamaskNetworkId: currentNetworkId, txParams: {} },
+ { id: 3, status: 'approved', metamaskNetworkId: currentNetworkId, txParams: {} },
{ id: 4, status: 'signed', metamaskNetworkId: currentNetworkId, txParams: {} },
{ id: 5, status: 'submitted', metamaskNetworkId: currentNetworkId, txParams: {} },
{ id: 6, status: 'confimed', metamaskNetworkId: currentNetworkId, txParams: {} },
@@ -425,5 +425,4 @@ describe('Transaction Controller', function () {
assert(txController.pendingTxTracker.getPendingTransactions()[0].status, 'submitted')
})
})
-
})