Skip to content

Commit

Permalink
api: Use "chain" db schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mitjat committed Mar 7, 2023
1 parent c019f2f commit c9a1636
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storage/client/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ type QueryFactory struct {
}

func NewQueryFactory(chainID string, runtime string) QueryFactory {
return QueryFactory{chainID, runtime}
return QueryFactory{"chain", runtime}
}

func QueryFactoryFromCtx(ctx context.Context) QueryFactory {
// Extract ChainID from context. It's populated from the runtime config,
// so it should always be present.
chainID, ok := ctx.Value(common.ChainIDContextKey).(string)
_, ok := ctx.Value(common.ChainIDContextKey).(string)
if !ok {
panic(fmt.Sprintf("cannot retrieve chain ID from ctx %v", ctx))
}
Expand All @@ -41,7 +41,7 @@ func QueryFactoryFromCtx(ctx context.Context) QueryFactory {
}

return QueryFactory{
chainID: chainID,
chainID: "chain",
runtime: runtime,
}
}
Expand Down

0 comments on commit c9a1636

Please sign in to comment.