Skip to content

Commit

Permalink
fix: custom sequencer struct field type
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs committed Dec 19, 2024
1 parent cf70650 commit cb1ed42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
5 changes: 2 additions & 3 deletions utils/sequencer/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package sequencer
import (
"time"

cosmossdkmath "cosmossdk.io/math"
cosmossdktypes "github.com/cosmos/cosmos-sdk/types"
"github.com/gogo/protobuf/types"
)
Expand Down Expand Up @@ -69,8 +68,8 @@ type Metadata struct {
Snapshots []*SnapshotInfo `json:"snapshots"`
// gas_price defines the value for each gas unit
// nolint:govet,staticcheck
GasPrice *cosmossdkmath.Int `json:"gas_price"`
FeeDenom DenomMetadata `json:"fee_denom"`
GasPrice string `json:"gas_price"`
FeeDenom DenomMetadata `json:"fee_denom"`
}

type DenomMetadata struct {
Expand Down
7 changes: 2 additions & 5 deletions utils/structs/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
"os"
"path/filepath"

cosmossdkmath "cosmossdk.io/math"

"github.com/dymensionxyz/roller/utils/filesystem"
sequencerutils "github.com/dymensionxyz/roller/utils/sequencer"
)
Expand Down Expand Up @@ -46,9 +44,8 @@ func InitializeMetadata(m sequencerutils.Metadata) {
if m.Snapshots == nil {
m.Snapshots = []*sequencerutils.SnapshotInfo{}
}
if m.GasPrice == nil {
zero := cosmossdkmath.NewInt(0)
m.GasPrice = &zero
if m.GasPrice == "" {
m.GasPrice = ""
}
}

Expand Down

0 comments on commit cb1ed42

Please sign in to comment.