Skip to content

Commit

Permalink
Backport upstream fix chainlink/pull/10405
Browse files Browse the repository at this point in the history
The fix -- BCF-2610: fix web interfaces to work with multiple chains [1]
applied to CCIP version -- `v2.5.0-ccip1.1.1`.

[1]: smartcontractkit/chainlink#10405 (move len check to match previous behavior: PR #10405)
  • Loading branch information
sirenko committed Oct 3, 2023
1 parent 959be41 commit e7e368e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/web/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "<nil>" {
// evm keys are expected to be parsable as a big int
_, ok := big.NewInt(0).SetString(chainIDstr, 10)
Expand All @@ -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
Expand Down

0 comments on commit e7e368e

Please sign in to comment.