Skip to content

Commit

Permalink
feat: pass correct type to serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond committed Sep 1, 2023
1 parent ccec669 commit 29af992
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
query "github.com/cosmos/cosmos-sdk/types/query"
oraclekeeper "github.com/elys-network/elys/x/oracle/keeper"
"github.com/elys-network/elys/x/oracle/types"
oracletypes "github.com/elys-network/elys/x/oracle/types"
)

// AllCapabilities returns all capabilities available with the current wasmvm
Expand Down Expand Up @@ -73,7 +72,7 @@ func CustomQuerier(qp *QueryPlugin) func(ctx sdk.Context, request json.RawMessag
}

// Serializing the response to a JSON byte array
responseBytes, err := json.Marshal(priceResponse)
responseBytes, err := json.Marshal(*priceResponse)
if err != nil {
return nil, errorsmod.Wrap(err, "failed to serialize price response")
}
Expand All @@ -94,9 +93,3 @@ type PriceAll struct {
// oracletypes.QueryAllPriceRequest
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

type AllPriceResponse struct {
// oracletypes.QueryAllPriceResponse
Price []oracletypes.Price `protobuf:"bytes,1,rep,name=price,proto3" json:"price"`
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

0 comments on commit 29af992

Please sign in to comment.