From 2758b5f79db16e3a2147f617e037209efbc6c698 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Mon, 26 Aug 2024 14:49:47 -0500 Subject: [PATCH] fix test [goreleaser] --- services/rfq/relayer/relapi/client.go | 34 --------------------------- services/rfq/relayer/relapi/server.go | 15 +++++------- 2 files changed, 6 insertions(+), 43 deletions(-) diff --git a/services/rfq/relayer/relapi/client.go b/services/rfq/relayer/relapi/client.go index 89351180e4..30ea7edfed 100644 --- a/services/rfq/relayer/relapi/client.go +++ b/services/rfq/relayer/relapi/client.go @@ -54,40 +54,6 @@ func (r *relayerClient) Health(ctx context.Context) (ok bool, err error) { return ok, nil } -func (r *relayerClient) GetQuoteRequestStatusByTxHash(ctx context.Context, hash string) (*GetQuoteRequestResponse, error) { - var res GetQuoteRequestResponse - - resp, err := r.client.R().SetContext(ctx). - SetQueryParam("hash", hash). - SetResult(&res). - Get(getQuoteStatusByTxHashRoute) - if err != nil { - return nil, fmt.Errorf("failed to get quote request status by tx hash: %w", err) - } - if resp.StatusCode() != http.StatusOK { - return nil, fmt.Errorf("unexpected status code: %d", resp.StatusCode()) - } - - return &res, nil -} - -func (r *relayerClient) GetQuoteRequestStatusByTxID(ctx context.Context, txid string) (*GetQuoteRequestResponse, error) { - var res GetQuoteRequestResponse - - resp, err := r.client.R().SetContext(ctx). - SetQueryParam("id", txid). - SetResult(&res). - Get(getQuoteStatusByTxIDRoute) - if err != nil { - return nil, fmt.Errorf("failed to get quote request status by tx hash: %w", err) - } - if resp.StatusCode() != http.StatusOK { - return nil, fmt.Errorf("unexpected status code: %d", resp.StatusCode()) - } - - return &res, nil -} - func (r *relayerClient) RetryTransaction(ctx context.Context, txhash string) (*GetTxRetryResponse, error) { var res GetTxRetryResponse resp, err := r.client.R().SetContext(ctx). diff --git a/services/rfq/relayer/relapi/server.go b/services/rfq/relayer/relapi/server.go index 58391563cb..65fff5ac70 100644 --- a/services/rfq/relayer/relapi/server.go +++ b/services/rfq/relayer/relapi/server.go @@ -95,15 +95,12 @@ func NewRelayerAPI( } const ( - getHealthRoute = "/health" - // TODO: replace with non-status specific endpoints. - getQuoteStatusByTxHashRoute = "/status" - getQuoteStatusByTxIDRoute = "/status/by_tx_id" - getRetryRoute = "/retry" - postWithdrawRoute = "/withdraw" - getTxHashByNonceRoute = "/tx_hash/by_nonce" - getRequestByTxID = "/request/by_tx_id" - getRequestByTxHash = "/request/by_tx_hash" + getHealthRoute = "/health" + getRetryRoute = "/retry" + postWithdrawRoute = "/withdraw" + getTxHashByNonceRoute = "/tx_hash/by_nonce" + getRequestByTxID = "/request/by_tx_id" + getRequestByTxHash = "/request/by_tx_hash" ) var logger = log.Logger("relayer-api")