Skip to content

Commit

Permalink
Update api.go
Browse files Browse the repository at this point in the history
  • Loading branch information
nnn-gif committed Jul 4, 2024
1 parent 70745a9 commit a6c7f0e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/http/oraclebuilder/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ func (ob *Env) SupportedChains(context *gin.Context) {

for _, chainInfo := range chains {

if ob.SupportedChain == chainInfo.ChainID {
if contains(ob.SupportedChain, chainInfo.ChainID) {
chainArray = append(chainArray, chainInfo.ChainID)

}
Expand Down Expand Up @@ -964,3 +964,12 @@ func (ob *Env) Auth(context *gin.Context) {
}

}

func contains(arr []string, str string) bool {
for _, v := range arr {
if v == str {
return true
}
}
return false
}

0 comments on commit a6c7f0e

Please sign in to comment.