Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Remove lingering references to coordinator error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
albrow committed Aug 7, 2020
1 parent 2ad5a0e commit d24a48f
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 37 deletions.
3 changes: 0 additions & 3 deletions graphql/client/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,6 @@ type RejectedOrderCode = gqltypes.RejectedOrderCode

const (
RejectedOrderCodeEthRPCRequestFailed RejectedOrderCode = "ETH_RPC_REQUEST_FAILED"
RejectedOrderCodeCoordinatorRequestFailed RejectedOrderCode = "COORDINATOR_REQUEST_FAILED"
RejectedOrderCodeCoordinatorSoftCancelled RejectedOrderCode = "COORDINATOR_SOFT_CANCELLED"
RejectedOrderCodeCoordinatorEndpointNotFound RejectedOrderCode = "COORDINATOR_ENDPOINT_NOT_FOUND"
RejectedOrderCodeOrderHasInvalidMakerAssetAmount RejectedOrderCode = "ORDER_HAS_INVALID_MAKER_ASSET_AMOUNT"
RejectedOrderCodeOrderHasInvalidTakerAssetAmount RejectedOrderCode = "ORDER_HAS_INVALID_TAKER_ASSET_AMOUNT"
RejectedOrderCodeOrderExpired RejectedOrderCode = "ORDER_EXPIRED"
Expand Down
7 changes: 7 additions & 0 deletions graphql/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package graphql

const (
orderEventBufferSize = 100
)

//go:generate gqlgen generate
3 changes: 0 additions & 3 deletions graphql/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions graphql/gqltypes/conversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,6 @@ func RejectedCodeFromValidatorStatus(status ordervalidator.RejectedOrderStatus)
switch status.Code {
case ordervalidator.ROEthRPCRequestFailed.Code:
return RejectedOrderCodeEthRPCRequestFailed, nil
case ordervalidator.ROCoordinatorRequestFailed.Code:
return RejectedOrderCodeCoordinatorRequestFailed, nil
case ordervalidator.ROCoordinatorSoftCancelled.Code:
return RejectedOrderCodeCoordinatorSoftCancelled, nil
case ordervalidator.ROCoordinatorEndpointNotFound.Code:
return RejectedOrderCodeCoordinatorEndpointNotFound, nil
case ordervalidator.ROInvalidMakerAssetAmount.Code:
return RejectedOrderCodeOrderHasInvalidMakerAssetAmount, nil
case ordervalidator.ROInvalidTakerAssetAmount.Code:
Expand Down
8 changes: 1 addition & 7 deletions graphql/gqltypes/types_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,6 @@ for a list of all codes currently in use.
"""
enum RejectedOrderCode {
ETH_RPC_REQUEST_FAILED
COORDINATOR_REQUEST_FAILED
COORDINATOR_SOFT_CANCELLED
COORDINATOR_ENDPOINT_NOT_FOUND
ORDER_HAS_INVALID_MAKER_ASSET_AMOUNT
ORDER_HAS_INVALID_TAKER_ASSET_AMOUNT
ORDER_EXPIRED
Expand Down
12 changes: 0 additions & 12 deletions graphql/schema.resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
"github.com/ethereum/go-ethereum/common"
)

// go:generate gqlgen generate

func (r *mutationResolver) AddOrders(ctx context.Context, orders []*gqltypes.NewOrder, pinned *bool) (*gqltypes.AddOrdersResults, error) {
isPinned := false
if pinned != nil {
Expand Down Expand Up @@ -134,13 +132,3 @@ func (r *Resolver) Subscription() generated.SubscriptionResolver { return &subsc
type mutationResolver struct{ *Resolver }
type queryResolver struct{ *Resolver }
type subscriptionResolver struct{ *Resolver }

// !!! WARNING !!!
// The code below was going to be deleted when updating resolvers. It has been copied here so you have
// one last chance to move it out of harms way if you want. There are two reasons this happens:
// - When renaming or deleting a resolver the old code will be put in here. You can safely delete
// it when you're done.
// - You have helper methods in this file. Move them out to keep these resolver files clean.
const (
orderEventBufferSize = 100
)
3 changes: 0 additions & 3 deletions packages/mesh-graphql-client/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ export interface RejectedOrderResult {

export enum RejectedOrderCode {
EthRpcRequestFailed = 'ETH_RPC_REQUEST_FAILED',
CoordinatorRequestFailed = 'COORDINATOR_REQUEST_FAILED',
CoordinatorSoftCancelled = 'COORDINATOR_SOFT_CANCELLED',
CoordinatorEndpointNotFound = 'COORDINATOR_ENDPOINT_NOT_FOUND',
OrderHasInvalidMakerAssetAmount = 'ORDER_HAS_INVALID_MAKER_ASSET_AMOUNT',
OrderHasInvalidTakerAssetAmount = 'ORDER_HAS_INVALID_TAKER_ASSET_AMOUNT',
OrderExpired = 'ORDER_EXPIRED',
Expand Down

0 comments on commit d24a48f

Please sign in to comment.