Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"eth-block-tracker": "^4.4.2",
"eth-json-rpc-filters": "^4.2.1",
"eth-json-rpc-infura": "^5.1.0",
"eth-json-rpc-middleware": "^6.0.0",
"eth-json-rpc-middleware": "^8.0.1",
"eth-rpc-errors": "^3.0.0",
"eth-sig-util": "^1.4.2",
"ethereumjs-block": "^1.2.2",
Expand Down
2 changes: 1 addition & 1 deletion subproviders/cache.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const ProviderSubprovider = require('./json-rpc-engine-middleware')
const createBlockCacheMiddleware = require('eth-json-rpc-middleware/block-cache')
const { createBlockCacheMiddleware } = require('eth-json-rpc-middleware/dist/block-cache')
Copy link
Copy Markdown
Contributor

@mcmire mcmire Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accessing exports beyond the main file are no longer recommended (and in the future may be prohibited). You should be able to say:

Suggested change
const { createBlockCacheMiddleware } = require('eth-json-rpc-middleware/dist/block-cache')
const { createBlockCacheMiddleware } = require('eth-json-rpc-middleware')


class BlockCacheSubprovider extends ProviderSubprovider {
constructor(opts) {
Expand Down
2 changes: 1 addition & 1 deletion subproviders/fetch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const ProviderSubprovider = require('./json-rpc-engine-middleware')
const createFetchMiddleware = require('eth-json-rpc-middleware/fetch')
const { createFetchMiddleware } = require('eth-json-rpc-middleware/dist/fetch')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { createFetchMiddleware } = require('eth-json-rpc-middleware/dist/fetch')
const { createFetchMiddleware } = require('eth-json-rpc-middleware')


class FetchSubprovider extends ProviderSubprovider {
constructor(opts) {
Expand Down
2 changes: 1 addition & 1 deletion subproviders/inflight-cache.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const ProviderSubprovider = require('./json-rpc-engine-middleware')
const createInflightCacheMiddleware = require('eth-json-rpc-middleware/inflight-cache')
const { createInflightCacheMiddleware } = require('eth-json-rpc-middleware/dist/inflight-cache')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { createInflightCacheMiddleware } = require('eth-json-rpc-middleware/dist/inflight-cache')
const { createInflightCacheMiddleware } = require('eth-json-rpc-middleware')


class InflightCacheSubprovider extends ProviderSubprovider {
constructor(opts) {
Expand Down
Loading