diff --git a/cmd/http/oraclebuilder/api.go b/cmd/http/oraclebuilder/api.go index b26fbf6f9..820f12442 100644 --- a/cmd/http/oraclebuilder/api.go +++ b/cmd/http/oraclebuilder/api.go @@ -253,19 +253,8 @@ func (ob *Env) Create(context *gin.Context) { // List: list owner oracles func (ob *Env) List(context *gin.Context) { creator := context.Query("creator") - deleted := context.Query("deleted") - expired := context.Query("expired") - isDeleted, err := strconv.ParseBool(deleted) - if err != nil { - isDeleted = true - } - isExpired, err := strconv.ParseBool(expired) - if err != nil { - isExpired = true - } - - oracles, err := ob.RelDB.GetOraclesByOwner(creator, isDeleted, isExpired) + oracles, err := ob.RelDB.GetOraclesByOwner(creator) if err != nil { log.Errorln("List Oracles: error on getOraclesByOwner ", err) context.JSON(http.StatusInternalServerError, err) diff --git a/pkg/model/oracle.go b/pkg/model/oracle.go index b1c55f6ea..5554bac9c 100644 --- a/pkg/model/oracle.go +++ b/pkg/model/oracle.go @@ -224,7 +224,7 @@ func (rdb *RelDB) GetFeederResources() (addresses []string, err error) { } -func (rdb *RelDB) GetOraclesByOwner(owner string, deleted, expired bool) (oracleconfigs []dia.OracleConfig, err error) { +func (rdb *RelDB) GetOraclesByOwner(owner string) (oracleconfigs []dia.OracleConfig, err error) { var ( rows pgx.Rows deviationFloat float64 @@ -250,13 +250,12 @@ func (rdb *RelDB) GetOraclesByOwner(owner string, deleted, expired bool) (oracle ON t1.address = fu.oracle_address AND t1.chainID = fu.chain_id WHERE t1.owner = $1 - AND t1.deleted = $2 GROUP BY t1.address, t1.feeder_id, t1.owner, t1.symbols, t1.chainID, t1.frequency, t1.sleepseconds, t1.deviationpermille, t1.blockchainnode, t1.active, t1.mandatory_frequency, t1.feeder_address, t1.createddate, t1.feedselection, t1.lastupdate, t1.expired,t1.expired_time;`, oracleconfigTable, feederupdatesTable) - rows, err = rdb.postgresClient.Query(context.Background(), query, owner, deleted) + rows, err = rdb.postgresClient.Query(context.Background(), query, owner) if err != nil { return } diff --git a/pkg/model/relDB.go b/pkg/model/relDB.go index c6aa38cdc..37cbc372c 100644 --- a/pkg/model/relDB.go +++ b/pkg/model/relDB.go @@ -166,7 +166,7 @@ type RelDatastore interface { GetOracleConfig(address, chainid string) (oracleconfig dia.OracleConfig, err error) ChangeOracleState(feederID string, active bool) (err error) DeleteOracle(feederID string) (err error) - GetOraclesByOwner(owner string, deleted, expired bool) (oracleconfigs []dia.OracleConfig, err error) + GetOraclesByOwner(owner string) (oracleconfigs []dia.OracleConfig, err error) GetAllFeeders(bool) (oracleconfigs []dia.OracleConfig, err error) GetFeederResources() (addresses []string, err error) GetOracleUpdates(address string, chainid string, offset int) ([]dia.OracleUpdate, error)