Skip to content

Commit c4eba39

Browse files
committed
use slices.Contains
1 parent 415625d commit c4eba39

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

deployment/ccip/changeset/v1_6/cs_ccip_home.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"errors"
77
"fmt"
88
"math/big"
9+
"slices"
910
"strings"
1011

1112
"github.com/ethereum/go-ethereum/accounts/abi/bind"
@@ -205,14 +206,7 @@ func validateUSDCConfig(usdcConfig *pluginconfig.USDCCCTPObserverConfig, state s
205206
}
206207

207208
configuredSourcePool := common.HexToAddress(token.SourcePoolAddress)
208-
matchesDeployedPool := false
209-
for _, sourcePoolAddress := range validSourcePools {
210-
if configuredSourcePool == sourcePoolAddress {
211-
matchesDeployedPool = true
212-
break
213-
}
214-
}
215-
if matchesDeployedPool {
209+
if slices.Contains(validSourcePools, configuredSourcePool) {
216210
break
217211
}
218212

0 commit comments

Comments
 (0)