From 7a71c2d7b2d4395caf7f9471765165394844858b Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Fri, 5 Jul 2024 17:36:32 -0400 Subject: [PATCH] add rfq [goreleaser] --- contrib/opbot/botmd/botmd.go | 4 ++-- services/rfq/api/rest/server.go | 2 +- services/rfq/relayer/relapi/handler.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/opbot/botmd/botmd.go b/contrib/opbot/botmd/botmd.go index c7a1c09cc6..cba277b6f9 100644 --- a/contrib/opbot/botmd/botmd.go +++ b/contrib/opbot/botmd/botmd.go @@ -29,7 +29,7 @@ type Bot struct { } // NewBot creates a new bot server. -func NewBot(handler metrics.Handler, cfg config.Config) Bot { +func NewBot(handler metrics.Handler, cfg config.Config) *Bot { server := slacker.NewClient(cfg.SlackBotToken, cfg.SlackAppToken) bot := Bot{ handler: handler, @@ -48,7 +48,7 @@ func NewBot(handler metrics.Handler, cfg config.Config) Bot { bot.addMiddleware(bot.tracingMiddleware(), bot.metricsMiddleware()) bot.addCommands(bot.traceCommand(), bot.rfqLookupCommand(), bot.rfqRefund()) - return bot + return &bot } func (b *Bot) addMiddleware(middlewares ...slacker.CommandMiddlewareHandler) { diff --git a/services/rfq/api/rest/server.go b/services/rfq/api/rest/server.go index 1cffbd7bf5..e1c810f533 100644 --- a/services/rfq/api/rest/server.go +++ b/services/rfq/api/rest/server.go @@ -144,7 +144,7 @@ const ( QuoteRoute = "/quotes" // AckRoute is the API endpoint for handling relay ack related requests. AckRoute = "/ack" - // ContractsRoute is the API endpoint for returning a list fo contracts + // ContractsRoute is the API endpoint for returning a list fo contracts. ContractsRoute = "/contracts" cacheInterval = time.Minute ) diff --git a/services/rfq/relayer/relapi/handler.go b/services/rfq/relayer/relapi/handler.go index 929be8aa40..04d20184c7 100644 --- a/services/rfq/relayer/relapi/handler.go +++ b/services/rfq/relayer/relapi/handler.go @@ -142,6 +142,7 @@ func (h *Handler) GetTxRetry(c *gin.Context) { c.JSON(http.StatusOK, resp) } +// GetQuoteRequestByTxID gets the quote request by tx id. func (h *Handler) GetQuoteRequestByTxID(c *gin.Context) { txIDStr := c.Query("id") if txIDStr == "" { @@ -167,7 +168,6 @@ func (h *Handler) GetQuoteRequestByTxID(c *gin.Context) { QuoteRequestRaw: common.Bytes2Hex(quoteRequest.RawRequest), } c.JSON(http.StatusOK, resp) - } // Withdraw withdraws tokens from the relayer.