diff --git a/x/pricefeed/keeper/querier.go b/x/pricefeed/keeper/querier.go index db610e23..112444ea 100644 --- a/x/pricefeed/keeper/querier.go +++ b/x/pricefeed/keeper/querier.go @@ -41,7 +41,7 @@ func queryPrice(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) (res []by } _, found := keeper.GetMarket(ctx, requestParams.MarketID) if !found { - return []byte{}, sdkerrors.Wrap(types.ErrAssetNotFound, requestParams.MarketID) + return nil, sdkerrors.Wrap(types.ErrAssetNotFound, requestParams.MarketID) } currentPrice, sdkErr := keeper.GetCurrentPrice(ctx, requestParams.MarketID) if sdkErr != nil { @@ -72,7 +72,7 @@ func queryRawPrices(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) (res } _, found := keeper.GetMarket(ctx, requestParams.MarketID) if !found { - return []byte{}, sdkerrors.Wrap(types.ErrAssetNotFound, requestParams.MarketID) + return nil, sdkerrors.Wrap(types.ErrAssetNotFound, requestParams.MarketID) } rawPrices, err := keeper.GetRawPrices(ctx, requestParams.MarketID) @@ -97,7 +97,7 @@ func queryOracles(ctx sdk.Context, req abci.RequestQuery, keeper Keeper) (res [] oracles, err := keeper.GetOracles(ctx, requestParams.MarketID) if err != nil { - return []byte{}, sdkerrors.Wrap(types.ErrAssetNotFound, requestParams.MarketID) + return nil, sdkerrors.Wrap(types.ErrAssetNotFound, requestParams.MarketID) } bz, err := codec.MarshalJSONIndent(types.ModuleCdc, oracles)