Skip to content

Commit

Permalink
Update oracle.go
Browse files Browse the repository at this point in the history
  • Loading branch information
nnn-gif committed Sep 18, 2024
1 parent 7aca640 commit bdb7da1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/model/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ func (rdb *RelDB) GetKeyPairID(publicKey string) string {
func (rdb *RelDB) SetOracleConfig(ctx context.Context, customerId, address, feederID, owner, feederAddress, symbols, feedSelection, chainID, frequency, sleepseconds, deviationpermille, blockchainnode, mandatoryFrequency, name string, draft bool) error {
currentTime := time.Now()
query := fmt.Sprintf(`
INSERT INTO %s ( address,feeder_id,owner,symbols,chainID,frequency,sleepseconds,deviationpermille,blockchainnode,mandatory_frequency,feeder_address,createddate,lastupdate,feedSelection,name,draft,customer_id)
INSERT INTO %s ( address,feeder_id,owner,symbols,chainID,
frequency,sleepseconds,deviationpermille,blockchainnode,mandatory_frequency,
feeder_address,createddate,lastupdate,feedSelection,name,
draft,customer_id)
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17)
ON CONFLICT(feeder_id)
DO UPDATE SET symbols=$4,frequency=$6,sleepseconds=$7,deviationpermille=$8,blockchainnode=$9,mandatory_frequency=$10,feeder_address=$11,lastupdate=$13,feedSelection=$14,name=$16,draft=$17`,
DO UPDATE SET symbols=$4,frequency=$6,sleepseconds=$7,deviationpermille=$8,blockchainnode=$9,mandatory_frequency=$10,
feeder_address=$11,lastupdate=$13,feedSelection=$14,name=$15,draft=$16`,
oracleconfigTable,
)

Expand Down

0 comments on commit bdb7da1

Please sign in to comment.