Skip to content

Commit

Permalink
update the optin query interface
Browse files Browse the repository at this point in the history
  • Loading branch information
trestinlsd committed Oct 11, 2024
1 parent b7f239b commit e3c0de2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions x/operator/keeper/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ func (k *Keeper) GetOptedInAVSForOperator(ctx sdk.Context, operatorAddr string)
if err != nil {
return nil, err
}
avsList = append(avsList, keys[1])
if k.IsOptedIn(ctx, keys[0], keys[1]) {
avsList = append(avsList, keys[1])
}
}
return avsList, nil
}
Expand Down Expand Up @@ -234,7 +236,7 @@ func (k *Keeper) GetOptedInOperatorListByAVS(ctx sdk.Context, avsAddr string) ([
if err != nil {
return nil, err
}
if avsAddr == keys[1] {
if avsAddr == keys[1] && k.IsOptedIn(ctx, keys[0], keys[1]) {
operatorList = append(operatorList, keys[0])
}
}
Expand Down

0 comments on commit e3c0de2

Please sign in to comment.