diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fcdee7..ba8ec0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [5.1.0] - 2020-09-22 + +### Changed + +- Update RPC packages ([#40](https://github.com/MetaMask/eth-json-rpc-infura/pull/40)) + - `json-rpc-engine@5.3.0` + - `eth-json-rpc-middleware@6.0.0` + ## [5.0.0] - 2020-09-08 ### Changed @@ -20,6 +28,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Use `eth-rpc-errors@3.0.0` ([#28](https://github.com/MetaMask/eth-json-rpc-infura/pull/28)) - Use `eth-json-rpc-middleware@4.4.1` ([#15](https://github.com/MetaMask/eth-json-rpc-infura/pull/15)) -[Unreleased]:https://github.com/MetaMask/eth-json-rpc-infura/compare/v5.0.0...HEAD +[Unreleased]:https://github.com/MetaMask/eth-json-rpc-infura/compare/v5.1.0...HEAD +[5.1.0]:https://github.com/MetaMask/eth-json-rpc-infura/compare/v5.0.0...v5.1.0 [5.0.0]:https://github.com/MetaMask/eth-json-rpc-infura/compare/v4.1.0...v5.0.0 [4.1.0]:https://github.com/MetaMask/eth-json-rpc-infura/compare/v4.0.2...v4.1.0 diff --git a/package.json b/package.json index a7e2648..799bdb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eth-json-rpc-infura", - "version": "5.0.0", + "version": "5.1.0", "main": "src/index.js", "directories": { "test": "test" diff --git a/src/index.js b/src/index.js index 8d5304e..72fbdd4 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ const createAsyncMiddleware = require('json-rpc-engine/src/createAsyncMiddleware') -const { ethErrors: rpcErrors } = require('eth-rpc-errors') +const { ethErrors } = require('eth-rpc-errors') const fetch = require('node-fetch') const RETRIABLE_ERRORS = [ @@ -80,7 +80,7 @@ async function performFetch (network, projectId, extraHeaders, req, res, source) if (!response.ok) { switch (response.status) { case 405: - throw rpcErrors.rpc.methodNotFound() + throw ethErrors.rpc.methodNotFound() case 429: throw createRatelimitError() @@ -151,5 +151,5 @@ function createTimeoutError () { } function createInternalError (msg) { - return rpcErrors.rpc.internal(msg) + return ethErrors.rpc.internal(msg) }