diff --git a/core/web/common.go b/core/web/common.go index 1afc1636ba..f4907ac5f7 100644 --- a/core/web/common.go +++ b/core/web/common.go @@ -15,10 +15,6 @@ var ( ) func getChain(legacyChains evm.LegacyChainContainer, chainIDstr string) (chain evm.Chain, err error) { - if legacyChains.Len() > 1 { - return nil, ErrMultipleChains - } - if chainIDstr != "" && chainIDstr != "" { // evm keys are expected to be parsable as a big int _, ok := big.NewInt(0).SetString(chainIDstr, 10) @@ -32,6 +28,10 @@ func getChain(legacyChains evm.LegacyChainContainer, chainIDstr string) (chain e return chain, nil } + if legacyChains.Len() > 1 { + return nil, ErrMultipleChains + } + chain, err = legacyChains.Default() if err != nil { return nil, err