Skip to content

Commit

Permalink
Merge branch '1.x' into release/1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
spacesailor24 committed Nov 15, 2021
2 parents edb812d + 2812172 commit 994988b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,4 +480,9 @@ Released with 1.0.0-beta.37 code base.

## [Unreleased]

## [1.6.2]
## [1.7.0]

### Changed

- Changed getFeeHistory first parameter type from `number` to `hex` according to the [spec](https://playground.open-rpc.org/?schemaUrl=https://raw.githubusercontent.com/ethereum/eth1.0-apis/assembled-spec/openrpc.json&uiSchema%5BappBar%5D%5Bui:splitView%5D=false&uiSchema%5BappBar%5D%5Bui:input%5D=false&uiSchema%5BappBar%5D%5Bui:examplesDropdown%5D=false) (#4529)

2 changes: 1 addition & 1 deletion packages/web3-eth/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ var Eth = function Eth() {
name: 'getFeeHistory',
call: 'eth_feeHistory',
params: 3,
inputFormatter: [utils.toNumber, formatter.inputBlockNumberFormatter, null]
inputFormatter: [utils.numberToHex, formatter.inputBlockNumberFormatter, null]
}),
new Method({
name: 'getAccounts',
Expand Down
12 changes: 6 additions & 6 deletions test/eth.feeHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var methodCall = 'eth_feeHistory';
var tests = [
{
args: [4, "0xA30953", []],
formattedArgs: [4, "0xa30953", []],
formattedArgs: ['0x4', "0xa30953", []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -45,7 +45,7 @@ var tests = [
},
{
args: ['0x4', 10684755, []],
formattedArgs: [4, "0xa30953", []],
formattedArgs: ['0x4', "0xa30953", []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -82,7 +82,7 @@ var tests = [
},
{
args: [new BigNumber(4), '10684755', []],
formattedArgs: [4, "0xa30953", []],
formattedArgs: ["0x4", "0xa30953", []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -119,7 +119,7 @@ var tests = [
},
{
args: [4, 'latest', []],
formattedArgs: [4, 'latest', []],
formattedArgs: ["0x4", 'latest', []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -156,7 +156,7 @@ var tests = [
},
{
args: [4, 'earliest', []],
formattedArgs: [4, 'earliest', []],
formattedArgs: ["0x4", 'earliest', []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down Expand Up @@ -193,7 +193,7 @@ var tests = [
},
{
args: [4, 'pending', []],
formattedArgs: [4, 'pending', []],
formattedArgs: ['0x4', 'pending', []],
result: {
"baseFeePerGas": [
"0xa",
Expand Down

0 comments on commit 994988b

Please sign in to comment.