Skip to content

Commit

Permalink
Merge pull request #5 from feature/external-seq/espresso/v2/patch-2
Browse files Browse the repository at this point in the history
Refactor byte conversion for station ID
  • Loading branch information
ComputerKeeda authored Oct 3, 2024
2 parents 82506e9 + 61083d5 commit 089b991
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion x/trackgate/keeper/msg_server_init_station.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ func (k msgServer) InitStation(goCtx context.Context, msg *types.MsgInitStation)
}

extTrackStationsDataDB := prefix.NewStore(storeAdapter, types.KeyPrefix(types.ExtTrackStationsDataStoreKey))
uniqueStationIDCheck := extTrackStationsDataDB.Get([]byte(stationId))
stationIdBytes := []byte(stationId)
uniqueStationIDCheck := extTrackStationsDataDB.Get(stationIdBytes)
if uniqueStationIDCheck != nil {
return &types.MsgInitStationResponse{
Status: false,
Expand Down
3 changes: 2 additions & 1 deletion x/trackgate/keeper/msg_server_schema_creation.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ func (k msgServer) SchemaCreation(goCtx context.Context, msg *types.MsgSchemaCre
}

extTrackStationsDataDB := prefix.NewStore(storeAdapter, types.KeyPrefix(types.ExtTrackStationsDataStoreKey))
stationDataByte := extTrackStationsDataDB.Get([]byte(extTrackStationId))
extTrackStationIdByte := []byte(extTrackStationId)
stationDataByte := extTrackStationsDataDB.Get(extTrackStationIdByte)
if stationDataByte == nil {
return &types.MsgSchemaCreationResponse{
SchemaKey: "",
Expand Down

0 comments on commit 089b991

Please sign in to comment.