Skip to content

Commit

Permalink
Fix: fee type in rollup 24h stats (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky authored Jul 14, 2024
1 parent e2bf484 commit 6eb277c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/api/docs/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions cmd/api/handler/responses/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ func NewSquareSizeResponse(m map[int][]storage.SeriesItem) SquareSizeResponse {
}

type RollupStats24h struct {
Id int64 `example:"321" format:"integer" json:"id,omitempty" swaggertype:"integer"`
Name string `example:"Rollup name" format:"string" json:"name,omitempty" swaggertype:"string"`
Logo string `example:"https://some_link.com/image.png" format:"string" json:"logo,omitempty" swaggertype:"string"`
Size int64 `example:"123" format:"integer" json:"size" swaggertype:"integer"`
Fee int64 `example:"123" format:"integer" json:"fee" swaggertype:"integer"`
BlobsCount int64 `example:"123" format:"integer" json:"blobs_count" swaggertype:"integer"`
Id int64 `example:"321" format:"integer" json:"id,omitempty" swaggertype:"integer"`
Name string `example:"Rollup name" format:"string" json:"name,omitempty" swaggertype:"string"`
Logo string `example:"https://some_link.com/image.png" format:"string" json:"logo,omitempty" swaggertype:"string"`
Size int64 `example:"123" format:"integer" json:"size" swaggertype:"integer"`
Fee float64 `example:"123" format:"number" json:"fee" swaggertype:"integer"`
BlobsCount int64 `example:"123" format:"integer" json:"blobs_count" swaggertype:"integer"`
}

func NewRollupStats24h(stats storage.RollupStats24h) RollupStats24h {
Expand Down
2 changes: 1 addition & 1 deletion cmd/api/handler/stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ func (s *StatsTestSuite) TestRollupStats24h() {
Logo: "logo",
RollupId: 1,
Size: 12,
Fee: 43,
Fee: 43.01,
BlobsCount: 123,
},
}, nil)
Expand Down
12 changes: 6 additions & 6 deletions internal/storage/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ func NewSeriesRequest(from, to int64) SeriesRequest {
}

type RollupStats24h struct {
RollupId int64 `bun:"rollup_id"`
Name string `bun:"name"`
Logo string `bun:"logo"`
Size int64 `bun:"size"`
Fee int64 `bun:"fee"`
BlobsCount int64 `bun:"blobs_count"`
RollupId int64 `bun:"rollup_id"`
Name string `bun:"name"`
Logo string `bun:"logo"`
Size int64 `bun:"size"`
Fee float64 `bun:"fee"`
BlobsCount int64 `bun:"blobs_count"`
}

type SeriesItem struct {
Expand Down

0 comments on commit 6eb277c

Please sign in to comment.