From ce147bf6d8431f4f0cb5b4de46a5af9628b3e9e2 Mon Sep 17 00:00:00 2001 From: Frankie Date: Fri, 16 Nov 2018 08:34:08 -1000 Subject: Tx controller now uses safe event emitter (#5769) * transactions - use safe-event-emitter over events * tests - pass a platform object on init with a noop showTransactionNotification * test - fix for tx-state-history-helper trying to reduce an empty array * deps - safe-event-emitter * lint --- app/scripts/controllers/transactions/tx-state-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts/controllers/transactions/tx-state-manager.js') diff --git a/app/scripts/controllers/transactions/tx-state-manager.js b/app/scripts/controllers/transactions/tx-state-manager.js index 62319507d..2a7f207e1 100644 --- a/app/scripts/controllers/transactions/tx-state-manager.js +++ b/app/scripts/controllers/transactions/tx-state-manager.js @@ -1,5 +1,5 @@ const extend = require('xtend') -const EventEmitter = require('events') +const EventEmitter = require('safe-event-emitter') const ObservableStore = require('obs-store') const ethUtil = require('ethereumjs-util') const log = require('loglevel') -- cgit From 1988e1e96b09a47ad5428083bb2ed38cb2d7e0a8 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Fri, 16 Nov 2018 21:24:55 -0330 Subject: ESLint fixes (#5775) * eslint . --fix * Upgrade all ESLint warnings to errors --- app/scripts/controllers/transactions/tx-state-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts/controllers/transactions/tx-state-manager.js') diff --git a/app/scripts/controllers/transactions/tx-state-manager.js b/app/scripts/controllers/transactions/tx-state-manager.js index 2a7f207e1..151082452 100644 --- a/app/scripts/controllers/transactions/tx-state-manager.js +++ b/app/scripts/controllers/transactions/tx-state-manager.js @@ -86,7 +86,7 @@ class TransactionStateManager extends EventEmitter { @returns {array} the tx list whos status is approved if no address is provide returns all txMetas who's status is approved for the current network */ - getApprovedTransactions(address) { + getApprovedTransactions (address) { const opts = { status: 'approved' } if (address) opts.from = address return this.getFilteredTxList(opts) -- cgit