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