Skip to content

Commit

Permalink
fix firmware name (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhiran authored Nov 22, 2024
1 parent f899715 commit 362de4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions db/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type firmwareData struct {

var pebbleFirmwareKey = crypto.Keccak256Hash([]byte("pebble_firmware"))

func (d *DB) UpsertApp(projectID uint64, name string, key [32]byte, value []byte) error {
func (d *DB) UpsertApp(projectID uint64, key [32]byte, value []byte) error {
if d.ioidProjectID != projectID {
slog.Debug("not ioid project metadata", "project_id", projectID, "ioid_project_id", d.ioidProjectID)
return nil
Expand All @@ -48,7 +48,7 @@ func (d *DB) UpsertApp(projectID uint64, name string, key [32]byte, value []byte
}

t := App{
ID: name,
ID: firmware.Name,
Version: firmware.Version,
Uri: firmware.URL,
OperationTimes: NewOperationTimes(),
Expand Down
4 changes: 2 additions & 2 deletions monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
type (
ScannedBlockNumber func() (uint64, error)
UpsertScannedBlockNumber func(uint64) error
UpsertProjectMetadata func(projectID uint64, name string, key [32]byte, value []byte) error
UpsertProjectMetadata func(projectID uint64, key [32]byte, value []byte) error
)

type Handler struct {
Expand Down Expand Up @@ -69,7 +69,7 @@ func (c *contract) processLogs(logs []types.Log) error {
if err != nil {
return errors.Wrap(err, "failed to parse project add metadata event")
}
if err := c.h.UpsertProjectMetadata(e.ProjectId.Uint64(), e.Name, e.Key, e.Value); err != nil {
if err := c.h.UpsertProjectMetadata(e.ProjectId.Uint64(), e.Key, e.Value); err != nil {
return err
}
}
Expand Down

0 comments on commit 362de4c

Please sign in to comment.