problem: invalid eth_chainId for Ethereum Mainnet
This commit is contained in:
@@ -134,7 +134,7 @@ class DefaultEthereumMethods(
|
||||
"eth_chainId" -> {
|
||||
when {
|
||||
Chain.ETHEREUM == chain -> {
|
||||
"\"0x0\""
|
||||
"\"0x1\""
|
||||
}
|
||||
Chain.ETHEREUM_CLASSIC == chain -> {
|
||||
"\"0x3d\""
|
||||
@@ -186,4 +186,4 @@ class DefaultEthereumMethods(
|
||||
override fun getSupportedMethods(): Set<String> {
|
||||
return allowedMethods.plus(hardcodedMethods).toSortedSet()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class DefaultEthereumMethodsSpec extends Specification {
|
||||
new String(new DefaultEthereumMethods(chain).executeHardcoded("eth_chainId")) == id
|
||||
where:
|
||||
chain | id
|
||||
Chain.ETHEREUM | '"0x0"'
|
||||
Chain.ETHEREUM | '"0x1"'
|
||||
Chain.ETHEREUM_CLASSIC | '"0x3d"'
|
||||
Chain.TESTNET_KOVAN | '"0x2a"'
|
||||
Chain.TESTNET_GOERLI | '"0x5"'
|
||||
|
||||
Reference in New Issue
Block a user