Skip to content

Commit

Permalink
5.1.0 (#41)
Browse files Browse the repository at this point in the history
* 5.1.0

* Remove unnecessary variable renaming

* Update changelog
  • Loading branch information
rekmarks authored Sep 23, 2020
1 parent 69b3d37 commit 2d38ad6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eth-json-rpc-infura",
"version": "5.0.0",
"version": "5.1.0",
"main": "src/index.js",
"directories": {
"test": "test"
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -151,5 +151,5 @@ function createTimeoutError () {
}

function createInternalError (msg) {
return rpcErrors.rpc.internal(msg)
return ethErrors.rpc.internal(msg)
}

0 comments on commit 2d38ad6

Please sign in to comment.