Empty local middleware, until explicitly requested (#5912)
* Empty local middleware, until explicitly requested * Remove previous empty overrides (unneeded now) * Re-add over-zealous keyethereum removal
This commit is contained in:
@@ -23,7 +23,8 @@ import { Db, Eth, Parity, Net, Personal, Shh, Signer, Trace, Web3 } from './rpc'
|
||||
import Subscriptions from './subscriptions';
|
||||
import util from './util';
|
||||
import { isFunction } from './util/types';
|
||||
import { LocalAccountsMiddleware } from './local';
|
||||
|
||||
import LocalAccountsMiddleware from '~/api/local';
|
||||
|
||||
export default class Api extends EventEmitter {
|
||||
constructor (transport, allowSubscriptions = true) {
|
||||
@@ -50,7 +51,7 @@ export default class Api extends EventEmitter {
|
||||
}
|
||||
|
||||
// Doing a request here in test env would cause an error
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
if (LocalAccountsMiddleware && process.env.NODE_ENV !== 'test') {
|
||||
const middleware = this.parity
|
||||
.nodeKind()
|
||||
.then((nodeKind) => {
|
||||
|
||||
@@ -14,8 +14,4 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
process.browser = true;
|
||||
}
|
||||
|
||||
export LocalAccountsMiddleware from './localAccountsMiddleware';
|
||||
export default null;
|
||||
|
||||
Reference in New Issue
Block a user