Skip to content

Commit

Permalink
[KS-136] Follow ups (#12768)
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-cordenier authored Apr 12, 2024
1 parent 69ebfbb commit f2963a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/services/relay/evm/cap_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func decodeID(input map[string]any, key string) ([]byte, error) {
return nil, err
}

if len(b) < 32 {
return nil, fmt.Errorf("incorrect length for id %s, expected 32 bytes, got %d", id, len(b))
if len(b) != idLen {
return nil, fmt.Errorf("incorrect length for id %s, expected %d bytes, got %d", id, idLen, len(b))
}

return b, nil
Expand Down
6 changes: 3 additions & 3 deletions core/services/workflows/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,19 @@ func emitReports(logger logger.Logger, trigger *triggers.MercuryTriggerService,
reports := []triggers.FeedReport{
{
FeedID: mercury.FeedID("0x1111111111111111111100000000000000000000000000000000000000000000").Bytes(),
FullReport: []byte{},
FullReport: []byte(fmt.Sprintf(`{ "feed": "ETH", "price": %d }`, prices[0])),
BenchmarkPrice: prices[0],
ObservationTimestamp: t,
},
{
FeedID: mercury.FeedID("0x2222222222222222222200000000000000000000000000000000000000000000").Bytes(),
FullReport: []byte{},
FullReport: []byte(fmt.Sprintf(`{ "feed": "LINK", "price": %d }`, prices[1])),
BenchmarkPrice: prices[1],
ObservationTimestamp: t,
},
{
FeedID: mercury.FeedID("0x3333333333333333333300000000000000000000000000000000000000000000").Bytes(),
FullReport: []byte{},
FullReport: []byte(fmt.Sprintf(`{ "feed": "BTC", "price": %d }`, prices[2])),
BenchmarkPrice: prices[2],
ObservationTimestamp: t,
},
Expand Down

0 comments on commit f2963a6

Please sign in to comment.