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:
parent
614a80bd23
commit
0f41121556
@ -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;
|
||||
|
@ -138,9 +138,9 @@ module.exports = {
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
'~/api/local': path.resolve(__dirname, '../src/api/local/localAccountsMiddleware.js'),
|
||||
'~': path.resolve(__dirname, '../src'),
|
||||
'keythereum': path.resolve(__dirname, '../node_modules/keythereum/dist/keythereum'),
|
||||
'vertx': 'empty-module'
|
||||
'keythereum': path.resolve(__dirname, '../node_modules/keythereum/dist/keythereum')
|
||||
},
|
||||
modules: [
|
||||
path.join(__dirname, '../node_modules')
|
||||
|
@ -41,10 +41,7 @@ module.exports = {
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
'~': path.resolve(__dirname, '../src'),
|
||||
'keythereum': 'empty-module',
|
||||
'secp256k1': 'empty-module',
|
||||
'vertx': 'empty-module'
|
||||
'~': path.resolve(__dirname, '../src')
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -75,10 +75,7 @@ module.exports = {
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'~': path.resolve(__dirname, '../src'),
|
||||
'keythereum': 'empty-module',
|
||||
'secp256k1': 'empty-module',
|
||||
'vertx': 'empty-module'
|
||||
'~': path.resolve(__dirname, '../src')
|
||||
},
|
||||
modules: [
|
||||
path.resolve('./src'),
|
||||
|
Loading…
Reference in New Issue
Block a user