Skip to content

Commit

Permalink
remove 0x [goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
golangisfun123 committed Oct 30, 2024
1 parent bc29e4d commit 72fa23b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion contrib/opbot/botmd/botmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions contrib/opbot/botmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (b *Bot) rfqLookupCommand() *slacker.CommandDefinition {
func (b *Bot) rfqRefund() *slacker.CommandDefinition {
return &slacker.CommandDefinition{
Command: "refund <tx>",
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"))
Expand Down Expand Up @@ -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)
}
Expand Down
14 changes: 3 additions & 11 deletions contrib/opbot/internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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,
}
}

Expand Down

0 comments on commit 72fa23b

Please sign in to comment.