From 72fa23bd1d1d44abae736af9475bd23d2ef6f141 Mon Sep 17 00:00:00 2001 From: golangisfun123 Date: Wed, 30 Oct 2024 10:41:16 -0500 Subject: [PATCH] remove 0x [goreleaser] --- contrib/opbot/botmd/botmd.go | 2 +- contrib/opbot/botmd/commands.go | 4 ++-- contrib/opbot/internal/client.go | 14 +++----------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/contrib/opbot/botmd/botmd.go b/contrib/opbot/botmd/botmd.go index 0d8c22f930..5d8b3ec395 100644 --- a/contrib/opbot/botmd/botmd.go +++ b/contrib/opbot/botmd/botmd.go @@ -48,7 +48,7 @@ func NewBot(handler metrics.Handler, cfg config.Config) *Bot { cfg: cfg, server: server, logger: experimentalLogger.MakeWrappedSugaredLogger(sugaredLogger), - rfqClient: internal.NewRFQClient(handler, cfg.RFQIndexerAPIURL, cfg.RelayerURLS), + rfqClient: internal.NewRFQClient(handler, cfg.RFQIndexerAPIURL), } // you should be able to run opbot even without signoz. diff --git a/contrib/opbot/botmd/commands.go b/contrib/opbot/botmd/commands.go index 69823809bc..37309575d6 100644 --- a/contrib/opbot/botmd/commands.go +++ b/contrib/opbot/botmd/commands.go @@ -227,7 +227,7 @@ func (b *Bot) rfqLookupCommand() *slacker.CommandDefinition { func (b *Bot) rfqRefund() *slacker.CommandDefinition { return &slacker.CommandDefinition{ Command: "refund ", - Description: "refund a quote request", + Description: "TESTING TESTING a quote request", Examples: []string{"refund 0x1234"}, Handler: func(ctx *slacker.CommandContext) { tx := stripLinks(ctx.Request().Param("tx")) @@ -279,7 +279,7 @@ func (b *Bot) rfqRefund() *slacker.CommandDefinition { ctx.Context(), big.NewInt(int64(rawRequest.Bridge.OriginChainID)), func(transactor *bind.TransactOpts) (tx *types.Transaction, err error) { - tx, err = fastBridgeContract.Refund(transactor, common.Hex2Bytes(rawRequest.Bridge.Request)) + tx, err = fastBridgeContract.Refund(transactor, common.Hex2Bytes(rawRequest.Bridge.Request[2:])) if err != nil { return nil, fmt.Errorf("error submitting refund: %w", err) } diff --git a/contrib/opbot/internal/client.go b/contrib/opbot/internal/client.go index b1b4c86ab8..6379a784d8 100644 --- a/contrib/opbot/internal/client.go +++ b/contrib/opbot/internal/client.go @@ -10,7 +10,6 @@ import ( "github.com/go-http-utils/headers" "github.com/go-resty/resty/v2" "github.com/synapsecns/sanguine/core/metrics" - "github.com/synapsecns/sanguine/services/rfq/relayer/relapi" ) const ( @@ -24,26 +23,19 @@ type RFQClient interface { } type rfqClientImpl struct { - client *resty.Client - relayerClients []relapi.RelayerClient + client *resty.Client } // NewRFQClient creates a new RFQClient. -func NewRFQClient(handler metrics.Handler, indexerURL string, relayerURLs []string) RFQClient { +func NewRFQClient(handler metrics.Handler, indexerURL string) RFQClient { client := resty.New() client.SetBaseURL(indexerURL) client.SetHeader(headers.UserAgent, "rfq-client") otelresty.TraceClient(client, otelresty.WithTracerProvider(handler.GetTracerProvider())) - var relayerClients []relapi.RelayerClient - for _, url := range relayerURLs { - relayerClients = append(relayerClients, relapi.NewRelayerClient(handler, url)) - } - return &rfqClientImpl{ - client: client, - relayerClients: relayerClients, + client: client, } }