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 19, 2024
1 parent 2ffdfd0 commit 1fefb92
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/model/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ func (rdb *RelDB) SetOracleConfig(ctx context.Context, customerId, address, feed
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,billable)
frequency,sleepseconds,deviationpermille,blockchainnode,
mandatory_frequency,feeder_address,createddate,lastupdate,feedSelection,
name,draft,customer_id,billable)
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18)
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=$15,draft=$16,address=$1,billable=$18`,
oracleconfigTable,
)

_, err := rdb.postgresClient.Exec(ctx, query, address, feederID, owner, symbols, chainID, frequency, sleepseconds, deviationpermille, blockchainnode, mandatoryFrequency, feederAddress, currentTime, currentTime, feedSelection, name, draft, customerId)
_, err := rdb.postgresClient.Exec(ctx, query, address, feederID, owner, symbols, chainID, frequency, sleepseconds, deviationpermille, blockchainnode, mandatoryFrequency, feederAddress, currentTime, currentTime, feedSelection, name, draft, customerId, billable)
if err != nil {
return err
}
Expand Down

0 comments on commit 1fefb92

Please sign in to comment.